Turning a Raspberry Pi into a Day/Night clock
- One minute read - 127 wordsOne of my kids is an early riser. And for the last year, that meant we’re all early risers, regardless of if we’ve gotten enough sleep. So in an effort to have everyone well rested, I’ve put a small 3.5" TFT screen on an unused Raspberry Pi and coded up a simple HTML page, CSS stylesheet and javascript to display a fullscreen clock on boot. In addition, the background of the clock is green when it’s between 7am and 7pm, and red during the night. Coding was the easy part. Getting my child to pay attention to it is now the tough part!
Repo in GitLab: daynight_clock
Requirements
- A Raspberry Pi with a standard Raspberry Pi OS install
- A TFT screen. I’m using a 3.5" TFT touchscreen