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

480x320 TFT/ILI9488 SPI wih EP32C3 (arduino-esp32) using Arduino_GFX Library

my dev.tools - FNIRSI 2C23T 3-in-1 Dual Channel Oscilloscope/Multimeter/Signal Generator