SMART HOME USING GOOGLE ASSISTANT | BLYNK | ESP 32 | WIFI + BLUETOOTH
Get link
Facebook
X
Pinterest
Email
Other Apps
YOUTUBE -COMING SOON..
CIRCUIT DIAGRAM
GOOGLE ASSISTANT CODE-UPLOADING SOON..SUSBCRIBE TO GET NOTIFIED
BLYNK-PROJECT CODE
/**************************************************************************************************************************** WiFi & BLE Control Home Automation using ESP32 and Blynk
Required Library: Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases BlynkESP32_BT_WF by Khoi Hoang https://github.com/khoih-prog/BlynkESP32_BT_WF- Pls install the old version Based on orignal code by Crosswalkersam https://community.blynk.cc/u/Crosswalkersam
The Sketch is Modified by Sayantan Pal https://github.com/palsayantan/12-ch-Ultimate-Home-Automation-using-ESP32
***************************************************************************************************************************** Important Notes: This code is intended to run on the ESP32 platform! Check your Tools->Board setting. And select ESP32 Dev Module To conmpile, use Partition Scheem with large APP size, such as -- Huge APP (3MB No OTA, 1MB SPIFFS)
****************************************************************************************************************************/ //modified by www.arvindunimap.com
// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth_WiFi[] = "Your Blynk Wifi Token"; char auth_BLE[] = "Your Blynk Ble Token";
char BLE_Device_Name[] = "ESP32_WiFi_BLE";
// Your WiFi credentials. char ssid[] = "YourWifiName"; // Your Network SSID char pass[] = "YourWifiPassword"; // Your Network PASSWARD
//www.arvindunimap.com int RELAY[4] = {25,32,33,29}; // Define Output pins connected to Relay //int SWITCH[12] = {29, 22, 21, 19, 18, 5, 33, 32, 35, 34, 39, 36}; // Define Input pins connected to Switch int VPIN[4] = {V1, V2, V3, V4}; // Define Virtual pins assigned in the APP
bool RELAY_STATE[4] = {1, 1, 1, 1};
#define STATUS_LED 2 // Shows Network Status
BLYNK_WRITE(V1) { RELAY_STATE[0] = param.asInt(); digitalWrite(RELAY[0], RELAY_STATE[0]); } BLYNK_WRITE(V2) { int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable digitalWrite(RELAY[1], !pinValue); // process received value } BLYNK_WRITE(V3) { RELAY_STATE[0] = param.asInt(); digitalWrite(RELAY[2], RELAY_STATE[0]); } BLYNK_WRITE(V4) { RELAY_STATE[0] = param.asInt(); digitalWrite(RELAY[3], RELAY_STATE[0]); }
//this function will synchronize Relay States when any network/Hardware interruption occurs
BLYNK_CONNECTED() { //Uncomment this line if you want to follow app configurations //Blynk.syncAll();
//Uncomment this line if you want to follow Hardware configurations for (int i = 0; i < 4; i++) { if (Blynk.connected()) Blynk_WF.virtualWrite(VPIN[i], RELAY_STATE[i]); else Blynk_BLE.virtualWrite(VPIN[i], RELAY_STATE[i]); } }
// Checks Network connection status in every 10 seconds void Network_Checkup() { if (WiFi.status() != WL_CONNECTED) { WiFi.begin(ssid, pass); delay(10); } }
/*void AUTOMATE() { for (int i = 0; i < 4; i++) { // if (digitalRead(SWITCH[i]) == LOW) { // if (SWITCH_STATE[i] != LOW) { // RELAY_STATE[i] = !RELAY_STATE[i]; // digitalWrite(RELAY[i], RELAY_STATE[i]); if (Blynk.connected()) Blynk_WF.virtualWrite(VPIN[i], RELAY_STATE[i]); else Blynk_BLE.virtualWrite(VPIN[i], RELAY_STATE[i]);}*/
1.Search Blogger in Google Chrome and click on it. 2.After getting into the page click Create Blog button. 3.Choose your email account . 4.Enter your password. 5.Give a name for your blog and click Next. 6.Choose a url for your blog. 7.Type your name. 8.You can see the Processing starts. 9.Your blog is now created. 10.The next tutorial is creating your own post and adding it on your menu. 11.Subscribe to my blogspot to get the next tutorial link directly to your inbox. 12.Kindly message me at +60 1116271735 for free consultatition.Make sure you subscribe to my blogspot before any consultations .Thank you for reading... Check out my smart home projects built from RASPBERRY PI / ESP 32.You can get idea for your Final Year Projects.
IMPORTANT NOTE: ************************************************** 1. PLEASE NOTE THAT THIS IS A GUIDE PREPARED FOR YOU TO LEARN SOMETHING IN LINUX. 2.PLEASE DO NOT COPY THIS PICTURES AND COPY IN YOUR LAB REPORT AS ANSWERS.IF YOU DONT UNDERSTAND ANYTHING YOU CAN DIRECTLY PM ME @ MY WHATSAPP LINK .THANK YOU AND GOOD LUCK. ************************************************** BEFORE MESSAGING: MAKE SURE YOU SUBSCRIBE TO MY BLOG BEFORE ANY QUESTIONS. YOU HELP ME , I HELP YOU ************************************************** We will use the dmesg program, which shows information about the running kernel, for this example. If it is not available, or if your computer has been running for a long time, the following may not match up quite right on your system. ************************************************** PART 1 1. Run the following command: cd /tmp 2. Use dmesg to create a file, so we can search for some information about your system: dmesg > dme...
Comments
Post a Comment