Monday, 25 May 2020

ESP32 Home Automation Using in Built Bluetooth

Watch Video Demonstration Carefully Till End -- ESP32 Home Automation Using in Built Bluetooth |Control Home Appliance Using ESP32 BLE + Android App


PLEASE SUBSCRIBE FOR MORE PROJECT VIDEOS --► HTTP://BIT.LY/29VPRS9

SCHEMATIC DIAGRAM:

FINAL SOFTWARE CODE:

#include "BluetoothSerial.h"
//////////////////////////////////////////////////////////////////////////////
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
///////////////////////////////////////////////////////////////////
String res = "";
///////////////////////////////////////////////////////////////////
BluetoothSerial SerialBT;
///////////////////////////////////////////////////////////////////
void setup()
{
Serial.begin(115200);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
pinMode(14, OUTPUT);
pinMode(27,OUTPUT);
SerialBT.begin("ESP32test"); //Bluetooth device name
Serial.println("The device started, now you can pair it with bluetooth!");
}

void loop()
{
while (!SerialBT.available());
while (SerialBT.available())
{
char add = SerialBT.read();
res = res + add;
delay(1);
}
///////////////////////////////////////////////////////////////////
// Assigning Actions on particular conditions
if (res == "T")
{
Serial.println("Connection Established!!!");
}
///////////////////////////////////////////////////////////////////
if (res == "1")
{
Serial.println("Turning ON 1st led");
digitalWrite(12, LOW);
}
///////////////////////////////////////////////////////////////////  
if (res == "A")
{
Serial.println("Turning OFF 1st led");
digitalWrite(12,HIGH);
}
///////////////////////////////////////////////////////////////////  
if (res == "2")
{
Serial.println("Turning ON 2nd led");
digitalWrite(14, LOW);
}
///////////////////////////////////////////////////////////////////  
if (res == "B")
{
Serial.println("Turning OFF 2nd led");
digitalWrite(14,HIGH);
}
///////////////////////////////////////////////////////////////////  
if (res == "3")
{
Serial.println("Turning ON 3rd led");
digitalWrite(27,LOW);
}
///////////////////////////////////////////////////////////////////  
if (res == "C")
{
Serial.println("Turning OFF 3rd led");
digitalWrite(27, HIGH);
}
///////////////////////////////////////////////////////////////////  
if (res == "4")
{
Serial.println("Turning ON 4th led");
digitalWrite(13, LOW);
}
///////////////////////////////////////////////////////////////////  
if (res == "D")
{
Serial.println("Turning OFF 4th led");
digitalWrite(13,HIGH);
}
///////////////////////////////////////////////////////////////////  
if (res == "9")
{
Serial.println("Turning ON all led");
digitalWrite(12, LOW);
digitalWrite(13, LOW);
digitalWrite(14, LOW);
digitalWrite(27, LOW);
}
///////////////////////////////////////////////////////////////////
if (res == "I")
{
Serial.println("Turning OFF all led");
digitalWrite(12, HIGH);
digitalWrite(13, HIGH);
digitalWrite(14, HIGH);
digitalWrite(27, HIGH);
}
///////////////////////////////////////////////////////////////////
res = ""; // clearing the string.
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
================================================================
PROJECT KIT HELP AND EXECUTION PROCESS
SVSEMBEDDED - 9491535690 / 7842358459
Project help & learning - Online Support
·         You can build this project at home. With step by step process Explain on video call and remote desktop command line console
·         Team Viewer: The Remote Desktop Software
·         Any Desk: The Fast Remote Desktop Application Software.
·         We will charge the Money depends on the project worth.
·         We will write the code on your Computer with Remote Desktop connection and Compile the code in your computer only Dumping the code to u r computer
·         Online embedded project kit support.
·         Indian timings 10:00am to 6:00pm. (WhatsApp / Google Duo video and voice calls)
·         You can build this project support in case of any doubts- online YouTube tutorials.
·         We can develop the Project with your own ideas also.
·         We will sell full project kit also(Send me mail to svsembedded@gmail.com)
·         Please Subscribe For More Project Videos --► http://bit.ly/29vPrS9
·         Slice--►http://www.svskits.in/
·         blog --►http://www.svskit.com/
·         site --►http://www.svsembedded.com/

No comments:

Post a comment