Unicorn HAT Mini Clock

Project Overview

This project involved forking an existing project on GitHub, unicornhatmini-clock. I took it further to add additional functionality such as a night-mode feature to dim the LEDs when it's dark. This HAT can get VERY bright so only 2% brightness is enough at night. I also added a few settings variables at the top, so it's easy to customise the clock without having to make changes to the code.

The main features

  • Blinking colon between hours and minutes
  • Color of text changes every minute or hour
  • Night mode to dim lights at night
  • Easy to change settings within the code

Settings

Setting Default Options
Flash the colon between hour and minutes True True / False
Day time brightness 0.10 0.02 - 1.00
Night time brightness 0.02 0.02 - 1.00
Day time start hour 8 0 - 24
Day time end hour 23 0 - 24
Enable night mode (with the above settings) True True / False
Change colour every minute False True / False
Change colour every hour True True / False

Pictures

Clock