Show progress for OTA via Neopixels
This commit is contained in:
parent
c2e34b4688
commit
ef90dba737
|
@ -151,6 +151,16 @@ void setup() {
|
||||||
|
|
||||||
ArduinoOTA.setHostname(Homie.getConfiguration().deviceId);
|
ArduinoOTA.setHostname(Homie.getConfiguration().deviceId);
|
||||||
ArduinoOTA.setPassword((const char *)"ctdo2342");
|
ArduinoOTA.setPassword((const char *)"ctdo2342");
|
||||||
|
ArduinoOTA.onStart([]() {
|
||||||
|
pixels.clear();
|
||||||
|
});
|
||||||
|
ArduinoOTA.onEnd([]() {
|
||||||
|
pixels.clear();
|
||||||
|
});
|
||||||
|
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
|
||||||
|
pixels.setPixelColor(progress / (total / NUMPIXELS), pixels.Color(255, 255, 255));
|
||||||
|
pixels.show();
|
||||||
|
});
|
||||||
ArduinoOTA.begin();
|
ArduinoOTA.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue