We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e575e8f + 156be57 commit e93c595Copy full SHA for e93c595
1 file changed
Digital_Clock_with_CircuitPython/code.py
@@ -58,7 +58,9 @@ def clock_conversion(h, m, set_brightness):
58
hour_12 = h if h <= 12 else h - 12
59
if hour_12 == 0:
60
hour_12 = 12
61
- display.print(f"{(hour_12):02}:{m:02}")
+ display.print(f"{(hour_12):02}:{m:02}") # Use for leading zero re. 09:35
62
+ # display.print(f"{hour_12:2}:{m:02}") # uncomment to suppress leading zero
63
+ # # (shows 1:00 instead of 01:00)
64
display.ampm = am_pm
65
if set_brightness:
66
if awake_hours[0] <= h <= awake_hours[1] - 1:
0 commit comments