Usane
June 12, 2024, 5:30pm
3
What do you want to connect to? You have a bluetooth block there so I assume you want to connect it to either an arduino via bluetooth module or an ESP****. It would be good to know. Anyway, you can find BT examples in @Juan_Antonio 's and some other tutorials.
The codes below are for Bluetooth Classic using HC-05 or ESP32.
In your Arduino code often you need to set certain I/O to a specific state, depending on the Bluetooth connection status.
This can be done in many ways, here is the way I do it:
If you are using HC-05, you can do it like this:
[hc05]
Define a I/O pin to monitor the connection status: const int BtStatus = 2;
Set the BtStatus pin to: pinMode (BtStatus, INPUT);
Connect the STATE pin from the HC-05 to BtStatus pin.
Monitor the c…
Hello friends,
in this tutorial Martyn Currey manages to use a Bluetooth HM-10 (BLE) in stand-alone mode, that is, without Arduino or any other device, to turn on/off an LED.
HM-10 stand-alone: Remote control an LED using MODE2:
http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/
I have tried it with a Bluetooth HC-05, but I have not succeeded.
For it to work for me I had to accompany the HC-05 with an HC06. Here is my experience.
https://community.appinventor.mit.edu/search?q=bluetooth%20arduino%20%23tutorials-and-guides