Hi Lee,
Excellent work on PiClock! I read your article and love how cleanly the architecture is structured.
Looking at your code, specifically piclock/schedule.py and piclock/config.py, you already have a great state machine for tracking day/night transitions. Currently, the clock blanks during the day (PICLOCK_OFF_AT), likely because the dimmed red LED is hard to see in daylight.
Based on medical research regarding circadian rhythms, I'd like to propose an upgraded Circadian Bi-Color Display mode:
- Daytime: The clock switches to Green (maximum human eye sensitivity at 555nm, great daytime contrast, signals alertness to the brain).
- Nighttime: The clock switches to Red (preserves melatonin production, prevents eye strain in total darkness).
How it fits your stack:
- Hardware: The Adafruit HT16K33 backpack has enough matrix outputs (16x8) to drive a Bi-color (Red/Green) 7-segment display directly. It just requires swapping the LED matrix block on the backpack.
- Software: In
piclock/display.py, you can map the green segments to the secondary RAM registers of the HT16K33. Then, inside piclock/app.py, instead of triggering control.off(), the schedule would trigger display.set_color('green') during the day and display.set_color('red') at night.
This would remove the need to turn the clock off entirely during the day, making it useful 24/7 while maintaining its medical "dark-bedroom" safety at night.
What do you think about adding support for bi-color matrices?
Hi Lee,
Excellent work on PiClock! I read your article and love how cleanly the architecture is structured.
Looking at your code, specifically
piclock/schedule.pyandpiclock/config.py, you already have a great state machine for tracking day/night transitions. Currently, the clock blanks during the day (PICLOCK_OFF_AT), likely because the dimmed red LED is hard to see in daylight.Based on medical research regarding circadian rhythms, I'd like to propose an upgraded Circadian Bi-Color Display mode:
How it fits your stack:
piclock/display.py, you can map the green segments to the secondary RAM registers of the HT16K33. Then, insidepiclock/app.py, instead of triggeringcontrol.off(), the schedule would triggerdisplay.set_color('green')during the day anddisplay.set_color('red')at night.This would remove the need to turn the clock off entirely during the day, making it useful 24/7 while maintaining its medical "dark-bedroom" safety at night.
What do you think about adding support for bi-color matrices?