Merge branch 'master' into 'master'
Show progress for OTA via Neopixels See merge request !2
This commit is contained in:
commit
0fca0ea91d
|
@ -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(100, 0, 0));
|
||||||
|
pixels.show();
|
||||||
|
});
|
||||||
ArduinoOTA.begin();
|
ArduinoOTA.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue