Hi All,
i'm trying to click a button(write) @ server-side, and ON an LED on client-side upon connected.
server-side,
if (deviceConnected) {
if (Button == 0) { // button pressed
pCharacteristic->setValue("ON");
pCharacteristic->notify();
}
}
how do i retrieve the sent value? is there any example sketch i can refer to for better understanding.
Thanks.
New bird on flight.
send data thru BLE between 2 esp32
-
- Posts: 101
- Joined: Tue Mar 22, 2022 5:23 am
Re: send data thru BLE between 2 esp32
Not exactly what you want to do, but from here you'll get an idea about how to proceed: https://randomnerdtutorials.com/esp-now ... ion-esp32/
After configuring the esp32 boards as master and slave, you have to send an ASCI character from the Master. For example 'H' for turning on the LED and 'L' for turning it off. The job of the MASTER will be to send H and L.
The slave will receive the ASCI character and Turn on/off the LED accordingly.
After configuring the esp32 boards as master and slave, you have to send an ASCI character from the Master. For example 'H' for turning on the LED and 'L' for turning it off. The job of the MASTER will be to send H and L.
The slave will receive the ASCI character and Turn on/off the LED accordingly.
Re: send data thru BLE between 2 esp32
Thanks.
I was thinking of using BLE, if i should be (button click)sending character from server side then client side to ON LED. or the other way.
I've use handphone app to ON the LED easily but would like to explore on how to use between 2 esp32 and learnt the basic.
I was thinking of using BLE, if i should be (button click)sending character from server side then client side to ON LED. or the other way.
I've use handphone app to ON the LED easily but would like to explore on how to use between 2 esp32 and learnt the basic.
学习中找战友。
Re: send data thru BLE between 2 esp32
This example sends a discrete IO bit over BLE
ESP32-C3, Arduino IDE, nimble BLE stack.
https://github.com/bobh/nimBLE-discrete-xfer
ESP32-C3, Arduino IDE, nimble BLE stack.
https://github.com/bobh/nimBLE-discrete-xfer
Re: send data thru BLE between 2 esp32
Thanks for the link.
Not use nimBLE library before, would go thru your code to understand and learn something from it.
Saw the youtube too , should be useful for me
Not use nimBLE library before, would go thru your code to understand and learn something from it.
Saw the youtube too , should be useful for me
学习中找战友。
Who is online
Users browsing this forum: No registered users and 83 guests