From ef90dba7377a26234c68d71d7ce7cc847969a6af Mon Sep 17 00:00:00 2001 From: starcalc Date: Mon, 27 Feb 2017 18:13:08 +0100 Subject: [PATCH 1/2] Show progress for OTA via Neopixels --- esp-wemos-schild/esp-wemos-schild.ino | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/esp-wemos-schild/esp-wemos-schild.ino b/esp-wemos-schild/esp-wemos-schild.ino index 3d8ff89..b5a2676 100644 --- a/esp-wemos-schild/esp-wemos-schild.ino +++ b/esp-wemos-schild/esp-wemos-schild.ino @@ -151,6 +151,16 @@ void setup() { ArduinoOTA.setHostname(Homie.getConfiguration().deviceId); 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(); } From ffdfa891ad5a938fab00f69c2d8abd927537d56d Mon Sep 17 00:00:00 2001 From: starcalc Date: Tue, 28 Feb 2017 09:46:24 +0100 Subject: [PATCH 2/2] Use color red on update, do not use full brightness --- esp-wemos-schild/esp-wemos-schild.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp-wemos-schild/esp-wemos-schild.ino b/esp-wemos-schild/esp-wemos-schild.ino index b5a2676..3238542 100644 --- a/esp-wemos-schild/esp-wemos-schild.ino +++ b/esp-wemos-schild/esp-wemos-schild.ino @@ -158,7 +158,7 @@ void setup() { pixels.clear(); }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { - pixels.setPixelColor(progress / (total / NUMPIXELS), pixels.Color(255, 255, 255)); + pixels.setPixelColor(progress / (total / NUMPIXELS), pixels.Color(100, 0, 0)); pixels.show(); }); ArduinoOTA.begin();