Skip to content

Feature Request: Circadian Bi-Color Mode (Green for Day / Red for Night) #1

Description

@octaprog7

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:

  1. 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.
  2. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions