fix colon display
This commit is contained in:
parent
b1952bebe4
commit
e65a2846c7
@ -11,9 +11,6 @@
|
||||
#include <Adafruit_LEDBackpack.h> // Support for the Backpack FeatherWing
|
||||
#include <Adafruit_GFX.h> // 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,13 +127,11 @@ 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();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user