Blink functionality
This commit is contained in:
parent
b2173aba39
commit
6b16da4ab3
|
@ -23,7 +23,16 @@ void setup() {
|
||||||
ArduinoOTA.begin();
|
ArduinoOTA.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long lastmillis = 0;
|
||||||
|
bool stateled = false;
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
Homie.loop();
|
Homie.loop();
|
||||||
ArduinoOTA.handle();
|
ArduinoOTA.handle();
|
||||||
|
if ((lastmillis+500)<millis()){
|
||||||
|
Homie.getLogger() << "Switching" << endl;
|
||||||
|
stateled = !stateled;
|
||||||
|
digitalWrite(PIN_LED, stateled?HIGH:LOW);
|
||||||
|
lastmillis = millis();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue