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.
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 |