From 8f7f107c3034293dd80fa0f254a86dc4c0c35c8a Mon Sep 17 00:00:00 2001 From: Brain in a Bowl Date: Thu, 1 Jul 2021 20:59:09 +0200 Subject: [PATCH] Reset steps at midnight --- Bahn-for-Watchy.ino | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Bahn-for-Watchy.ino b/Bahn-for-Watchy.ino index d758f37..28baffe 100644 --- a/Bahn-for-Watchy.ino +++ b/Bahn-for-Watchy.ino @@ -10,7 +10,15 @@ class WatchFace : public Watchy { //inherit and extend Watchy class int16_t x1, y1, lasty; uint16_t w, h; String textstring; - bool light = true; + bool light = false; + + // ** UPDATE ** + //resets step counter at midnight everyday + if(currentTime.Hour == 00 && currentTime.Minute == 00) { + sensor.resetStepCounter(); + } + + // ** DRAW ** //drawbg display.fillScreen(light ? GxEPD_WHITE : GxEPD_BLACK);