Template
consistent LED toggle
This commit is contained in:
@@ -85,6 +85,7 @@ void mqtt_setup() {
|
|||||||
WiFi.setPins(8,7,4,2);
|
WiFi.setPins(8,7,4,2);
|
||||||
|
|
||||||
pinMode(LED_PIN, OUTPUT);
|
pinMode(LED_PIN, OUTPUT);
|
||||||
|
digitalWrite(LED_PIN, HIGH);
|
||||||
|
|
||||||
// attempt to connect to Wifi network:
|
// attempt to connect to Wifi network:
|
||||||
DPRINT("Attempting to connect to WPA SSID: ");
|
DPRINT("Attempting to connect to WPA SSID: ");
|
||||||
@@ -188,7 +189,7 @@ void mqtt_loop() {
|
|||||||
|
|
||||||
// blink LED @ 1Hz
|
// blink LED @ 1Hz
|
||||||
if ((ticktime % 10) == 0) {
|
if ((ticktime % 10) == 0) {
|
||||||
digitalWrite(LED_PIN, !digitalRead(LED_PIN));
|
toggleLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user