VIDEO
How To Control ESP32 via Bluetooth
To aaj mai aapko aaj batane wala hu ki aap bluetooth se apne ESP32 ko ON aur OFF kaise kar sakte hai. Iske liye
aapke pass teen cheeje honi chahiye
ESP32
Bluetooth App
Arduino App sath me Code jisse ON aur OFF karna hai.
Agar aapke pass ye sari cheeje hai to aap seekh skte hai .
How To Work :-
To sabse phle aapko ARDUINO IDE install karna hai firr uske baad code upload karna hai
#include <BluetoothSerial.h>
BluetoothSerial SerialBT;
const int ledPin = 2;
void setup() {
Serial.begin(115200);
SerialBT.begin(“ESP32”); // Bluetooth device name
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW); // Initially turn off LED
}
void loop() {
if (Serial.available()) {
String data = Serial.readString();
handleData(data);
}
if (SerialBT.available()) {
String data = SerialBT.readString();
handleData(data);
}
}
void handleData(String data) {
Serial.println(data);
if (data == “turn on”) {
digitalWrite(ledPin, HIGH); // Turn on LED
SerialBT.println(“LED turned on”);
Serial.println(“LED turned on”);
} else if (data == “turn off”) {
digitalWrite(ledPin, LOW); // Turn off LED
SerialBT.println(“LED turned off”);
Serial.println(“LED turned off”);
}
}
upload karne ke baad compile karke check kar lo ki code sahi hai agar sahi hai to upload
kar do upload karne ke baad apne BLUETOOTH APP se connect kar lo agar APP nahi hai to Download Here
How To Control ESP32 via Bluetooth
How Download Arduino IDE App :-
Sabse pahle aapko ARDUINO IDE download karna hoga. Uske liye aapko google chrome pe ja kar search karna hoga
ARDUINO IDE uske baad phle number pe website aa jayegi .
Uske baad aapko waha pe Download and Install ARDUINO IDE dikh jayega .
Usko open karo. Open karne pe aapko waha pe INSTALLATION INSTRUCTION ke neeche aapko download dikh jayega.
Aapko waha pe download pe click karna hai aur download hone lagega .
Hum aapke liye app ka bhi tutorials layenge to Stay Tuned.
VIDEO
Post Views: 161