You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure Arduino IDE this way to communicate with this board:
26
+
Board type: NodeMCU 1.0 (ESP-12E Module)
27
+
Flash size: 4M (3M SPIFFS)
28
+
CPU Frequency: 80 MHz
29
+
Upload speed: 115200
30
30
31
31
*/
32
32
@@ -60,63 +60,63 @@ unsigned long lastPress1 = 0;
60
60
unsignedlong stateTime1 = 500; //runs until two seconds elapse
61
61
62
62
// The NodeMCU onboard LED will blink in sequence when it's successfully connected to the Blynk server
63
-
// (Useful when you install your project in your garage and you don't have access to the Arduino IDE serial monitor)
63
+
// (Useful when you install your project in your garage and you don't have access to the Arduino IDE serial monitor)
64
64
// For the built-in LED on th NodeMCU, LOW = On and HIGH = Off
65
65
BLYNK_CONNECTED() {
66
66
if (isFirstConnect) {
67
67
digitalWrite(wifi, LOW);
68
-
isFirstConnect = false;
69
-
Blynk.virtualWrite(V0, "Checking status...");
70
-
led.setColor(BLYNK_YELLOW);
71
-
// Not needed, but it will send you a push notification when it's connected. Useful if you reset the board or the Wi-Fi goes down when you're not at home.
72
-
// Uncomment if you want push notifications
73
-
//Blynk.notify("Garage doors connected to Wi-Fi !");
74
-
digitalWrite(wifi, LOW);
75
-
delay(1000);
76
-
digitalWrite(power, HIGH);
77
-
digitalWrite(wifi, HIGH);
78
-
delay(100);
79
-
digitalWrite(power, LOW);
80
-
digitalWrite(wifi, LOW);
81
-
delay(100);
82
-
digitalWrite(power, HIGH);
83
-
digitalWrite(wifi, HIGH);
84
-
delay(100);
85
-
digitalWrite(power, LOW);
86
-
digitalWrite(wifi, LOW);
87
-
delay(100);
88
-
digitalWrite(power, HIGH);
89
-
digitalWrite(wifi, HIGH);
90
-
delay(100);
91
-
digitalWrite(power, LOW);
92
-
digitalWrite(wifi, LOW);
93
-
delay(100);
94
-
digitalWrite(power, HIGH);
95
-
digitalWrite(wifi, HIGH);
96
-
delay(100);
97
-
digitalWrite(power, LOW);
98
-
digitalWrite(wifi, LOW);
99
-
delay(100);
100
-
digitalWrite(power, HIGH);
101
-
digitalWrite(wifi, HIGH);
102
-
delay(100);
103
-
digitalWrite(power, LOW);
104
-
digitalWrite(wifi, LOW);
105
-
delay(100);
106
-
}
107
-
}
68
+
isFirstConnect = false;
69
+
Blynk.virtualWrite(V0, "Checking status...");
70
+
led.setColor(BLYNK_YELLOW);
71
+
// Not needed, but it will send you a push notification when it's connected. Useful if you reset the board or the Wi-Fi goes down when you're not at home.
72
+
// Uncomment if you want push notifications
73
+
//Blynk.notify("Garage doors connected to Wi-Fi !");
74
+
digitalWrite(wifi, LOW);
75
+
delay(1000);
76
+
digitalWrite(power, HIGH);
77
+
digitalWrite(wifi, HIGH);
78
+
delay(100);
79
+
digitalWrite(power, LOW);
80
+
digitalWrite(wifi, LOW);
81
+
delay(100);
82
+
digitalWrite(power, HIGH);
83
+
digitalWrite(wifi, HIGH);
84
+
delay(100);
85
+
digitalWrite(power, LOW);
86
+
digitalWrite(wifi, LOW);
87
+
delay(100);
88
+
digitalWrite(power, HIGH);
89
+
digitalWrite(wifi, HIGH);
90
+
delay(100);
91
+
digitalWrite(power, LOW);
92
+
digitalWrite(wifi, LOW);
93
+
delay(100);
94
+
digitalWrite(power, HIGH);
95
+
digitalWrite(wifi, HIGH);
96
+
delay(100);
97
+
digitalWrite(power, LOW);
98
+
digitalWrite(wifi, LOW);
99
+
delay(100);
100
+
digitalWrite(power, HIGH);
101
+
digitalWrite(wifi, HIGH);
102
+
delay(100);
103
+
digitalWrite(power, LOW);
104
+
digitalWrite(wifi, LOW);
105
+
delay(100);
106
+
}
107
+
}
108
108
109
109
voidrelayGarageLexus() {
110
-
if(digitalRead(D5)) lastPress1 = millis();
111
-
if(millis() - lastPress1 < stateTime1){
110
+
if(digitalRead(D5)) lastPress1 = millis();
111
+
if(millis() - lastPress1 < stateTime1){
112
112
digitalWrite(D7, LOW);
113
-
} else {
113
+
} else {
114
114
digitalWrite(D7, HIGH);
115
115
}
116
-
}
116
+
}
117
117
118
118
voidgarageDoor() {
119
-
if (digitalRead(D3)) {
119
+
if (digitalRead(D3)) {
120
120
led.setColor(BLYNK_RED); // Reed switch is open, D3 is HIGH
121
121
Serial.println("Garage car X is open");
122
122
Blynk.virtualWrite(V0, "Garage car X is open");
@@ -126,7 +126,7 @@ void garageDoor() {
126
126
led.setColor(BLYNK_GREEN); // Reed switch is closed, D3 is LOW
0 commit comments