FeatherClock
A compact MicroPython clock project
Latest Release: 1.1.0
New
About FeatherClock
FeatherClock is a project for the Adafruit Feather HUZZAH ESP8266 or the ESP32-based Adafruit Feather HUZZAH32, both running running MicroPython.

It is an attempt to replicate my Electric Imp clock project. It uses the Adafruit FeatherWing four-digit, seven-segment LED add-on, or the equivalent 16 x 8 matrix LED add-on.
Currently, the clock has no remote control, which the Electric Imp Platform makes very easy to implement, but is rather less so here. You can set preferences, though. Adding a web UI, served locally or remotely, lies in a future phase of the project.
The project makes use of the HT16K33-Python library.
Installation and Setup
- Run
pip3 install adafruit-ampy
- Run
pip3 install esptool
- Running macOS Big Sur? You also need:
- Run
nano /usr/local/bin/esptool.py
- Comment out lines 56 to 61 inclusive.
- Save the file.
- Connect your assembled FeatherClock (Feather plus LED add-on).
- Run
ls /dev/cu*
- Note the Feather’s device file path.
- Download the latest version of MicroPython for your device.
- Update MicroPython:
esptool.py --port <FEATHER_DEVICE_PATH> erase_flash
esptool.py --port <FEATHER_DEVICE_PATH> --baud 460800 write_flash --flash_size=detect 0 esp8266-20200911-v1.13.bin
Note The above line shows the file for the ESP8266 — the ESP32 file will be different. It also shows version 1.13. Get the latest version of either file from MicroPython.
- Run
./install.sh <FEATHER_DEVICE_PATH>
- Press 3 if you’re using an ESP32-based device, or any other key for an ESP8266-based device.
- Press M if you’re using a matrix display, or any other key for segment display.
- Enter your WiFi SSID.
- Enter your WiFi password.
- After the code has copied, power-cycle your Feather Clock or press the RESET button.
Clock Settings
For now, the clock’s settings are applied by sending over a prefs.json
file with any or all of the following values:
{ "mode": <true/false>, # 24-hour (true) or 12-hour (false)
"colon": <true/false>, # Show a colon between the hours and minutes readouts
"flash": <true/false>, # Flash the colon symbol, if it's shown
"bright": 10, # Display brightness from 1 (dim) to 15 (bright)
"bst": <true/false> } # Auto-adjust for Daylight Saving Time
Having installed ampy
as above, you send over your prefs.json
file using:
ampy --port <FEATHER_DEVICE_PATH> put prefs.json
Back to the Top
Release Notes
- 1.1.0 3 December 2020
- Revised code.
- Added matrix display version.
- 1.0.10 19 November 2020
- Adds Feather Huzzah 32 version.
- 1.0.9 29 September 2020
- Improved RTC time checks.
- Improved installation script.
- 1.0.8 6 September 2019
- 1.0.7 25 April 2019
- Added optional on-device JSON prefs (
prefs.json
) loading.
- 1.0.6 13 April 2019
- Added app preferences structure.
- 1.0.5 10 April 2019
- Corrected the months used for BST checking.
- 1.0.4 9 April 2019
- Various linting-suggested code improvements.
- 1.0.3 8 April 2019
- Improved RTC updates by making NTP checks.
- 1.0.2 5 April 2019
- Added regular RTC updates.
- 1.0.1 4 April 2019
- Added disconnection indicator to display.
- Corrected constant usage.
- 1.0.0 3 April 2019
Back to the Top
Source Code
You can view FeatherClock’s source code at GitHub.
Back to the Top
Related Software
Back to the Top