diff --git a/esp_clock.ino b/esp_clock.ino index 8a4952d..9997dcc 100644 --- a/esp_clock.ino +++ b/esp_clock.ino @@ -11,9 +11,6 @@ #include // Support for the Backpack FeatherWing #include // Adafruit's graphics library -#define STASSID "Miracle" -#define STAPSK "***REMOVED***" - #define TIME_24_HOUR #define DISPLAY_ADDRESS 0x70 #define BRIGHTNESS 1 @@ -36,7 +33,6 @@ byte displayHours[24] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1 byte displayHours[24] = {12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; #endif -bool blinkColon = false; // Track colon status to blink once/sec int status = WL_IDLE_STATUS; bool shouldUpdate = true; String currentSSID; @@ -83,7 +79,10 @@ void loop() { incrementTime(); } displayTime(); - delay(1000); + displayColon(true); + delay(500); + displayColon(false); + delay(500); } void incrementTime() { @@ -128,14 +127,12 @@ void displayTime() { clockDisplay.writeDigitNum(3, 0); } } +} - // Blink the colon by flipping its value every loop iteration - // (which happens every second). - blinkColon = !blinkColon; - clockDisplay.drawColon(blinkColon); +void displayColon(bool on) { + clockDisplay.drawColon(on); - // Now push out to the display the new values that were set above. - clockDisplay.writeDisplay(); + clockDisplay.writeDisplay(); } void setupOTA() {