![]() int flag1 = 0 int flag2 = 0 int button int emergency int setting int delayAMOUNT int gpsSelect int distanceSelect int comingHome int openTest int closeTest int privacyMode int lightsIn float GPSLat float GPSLong float dist_calc=0 float dist_calc2=0 float diflat=0 float diflon=0 ĭefining variables to store information. Including libraries and setting Blynk debugging to true. #RED ALARM BUTTON ICON CHAR SERIAL#They are only the settings that the ESP starts up with, but can be changed in the app.Īutomated_Driveway_Gates.ino : #define BLYNK_PRINT Serial #include "settings.h" #include #include #include #include #include #RED ALARM BUTTON ICON CHAR FOR FREE#Available for free or premium in line, flat, gradient, isometric, glyph, sticker & more design styles. The last two settings don't need to be changed. Download 22 Alarm Button Gradient Vector Icons for commercial and personal use. gateDirection really doesn't need to be changed unless your gates are opening and closing opposite from the Blynk app. gateNumber is just the number of gates you are using (either 1 or 2). GATE #define gateNumber 2 //how many gates 1 or 2 #define gateDirection 1 //1 or 2 int gateOpenAmount = 10 //only for automatic mode, seconds only for on boot String Mode = "button" //automatic or button only for on boot Replace the WiFi SSID with your own and the WiFi PASS with your own. WiFi char WIFI_SSID = "your_ssid" char WIFI_PASS = "your_pass" const char passWord = "maker" //password of this device for OTA BLYNK_AUTH_TOKEN is for the driveway gates ESP, and BLYNK_AUTH_TOKEN_2 is for the indoor house alarm (leave blank if you haven't done this). Replace the top two tokens with your Blynk auth tokens to your devices. red, green, and blue is the pins of the red, green, and blue on the LED strips. If you haven't set up your led strips, just set the boolean ledStrip to false. lights boolean ledStrip = true #define red D1 #define green D8 #define blue D2 This is the electromagnetic lock pin on the ESP8266. If you haven't set up the indoor alarm, just set this boolean to false. Set houseAlarm to true if you have set up your indoor alarm and would like I to buzz when the gates are opened. Set notifications to true if you would like to be notified overtime the gates open or close (you can also delete the Blynk notifications widget on the app to disable notifications). Settings.h : //settings boolean notifications = true boolean houseAlarm = true The code is made in such a way that you can change all the settings in a separate settings.h file instead of going through and changing the code. ![]() ![]() Upload the code and open the serial monitor on baud rate 9600. Paste the "settings.h" code into this new tab, and you're ready to go. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |