BLE examples run on Nano 33 BLE (as Peripheral) and Uno R4 WiFi (as Central) in Arduino framework using ArduinoBLE library.

The video show ArduinoBLE examples run on Nano 33 BLE (Peripheral>LED example) and Uno R4 WiFi (Central>LedControl example). To remote control onboard LED via BLE.



What I changed on code is in LedControl.ino:

pinMode(buttonPin, INPUT);

change to:

pinMode(buttonPin, INPUT_PULLUP);
and
int buttonState = digitalRead(buttonPin);

change to:

int buttonState = !digitalRead(buttonPin);

Such that you can connect pin 2 on Uno R4 WiFi to GND to simulate key press,to remote control Nano 33 BLE onboard LED via BLE.

next:
~ This code communicate with MicroPython using aioble library - BLE communication between MicroPython aioble and ArduinoBLE.


Comments

Popular posts from this blog

MicroPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI, using boochow/MicroPython-ST7735 library.

CameraWebServe: ESP32-S3 (arduino-esp32) + OV5640 camera module