lucifer2615.
DIIDevHeads IoT Integration Server
•Created by lucifer2615. on 8/15/2024 in #edge-networking
issue with connecting classic bluetooth to android
hey there guys i dont know which is better for home automation system in esp32 . Can anyone tell me which is better for home automation system classic bluetooth or BLE ???
if anyone can help me please i want help from you kindly message me please
3 replies
DIIDevHeads IoT Integration Server
•Created by lucifer2615. on 8/14/2024 in #seeking-collabs
seeking help for connectivity issues in esp32 bluetooth with android
I found this code for connecting the bluetooth
#include "BluetoothSerial.h"
BluetoothSerial SerialBT;
bool isConnected = false;
void setup() {
Serial.begin(115200);
SerialBT.begin("ESP32_BT"); // Bluetooth device name
Serial.println("The device started, now you can pair it with Bluetooth!");
}
void loop() {
if (SerialBT.hasClient()) {
isConnected = true;
Serial.println("Connected");
} else {
isConnected = false;
Serial.println("Disconnected");
SerialBT.disconnect(); // Ensure any previous connections are closed
delay(5000); // Wait for 5 seconds before attempting to reconnect
SerialBT.begin("ESP32_BT"); // Restart Bluetooth
}
if (isConnected) {
// Handle your code when connected
}
delay(1000); // Check connection every second } but i can connect with this when the "serial bluetooth app "(available in playstore) for only serial communication but i want to make a home automation system with bluetooth so i want that when i am in range of esp then bluetooth will automatically connect with android and i can on off any device with my app
delay(1000); // Check connection every second } but i can connect with this when the "serial bluetooth app "(available in playstore) for only serial communication but i want to make a home automation system with bluetooth so i want that when i am in range of esp then bluetooth will automatically connect with android and i can on off any device with my app
3 replies
DIIDevHeads IoT Integration Server
•Created by lucifer2615. on 8/14/2024 in #seeking-collabs
Seeking help for home automation project on esp32
5 replies