{"id":18103056,"url":"https://github.com/smittytone/featherclock","last_synced_at":"2025-04-13T18:52:46.759Z","repository":{"id":79034607,"uuid":"179352478","full_name":"smittytone/FeatherClock","owner":"smittytone","description":"Feather Huzzah ESP8266/ESP32 Digital Clock","archived":false,"fork":false,"pushed_at":"2024-12-16T20:12:38.000Z","size":189,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T09:44:38.806Z","etag":null,"topics":["adafruit","adafruit-feather-huzzah","esp32","esp8266","micropython"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smittytone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-03T19:02:52.000Z","updated_at":"2024-07-15T07:16:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc8d468f-5b35-4cfc-bd4f-41c2f5f43ace","html_url":"https://github.com/smittytone/FeatherClock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smittytone%2FFeatherClock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smittytone%2FFeatherClock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smittytone%2FFeatherClock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smittytone%2FFeatherClock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smittytone","download_url":"https://codeload.github.com/smittytone/FeatherClock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766008,"owners_count":21158296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adafruit","adafruit-feather-huzzah","esp32","esp8266","micropython"],"created_at":"2024-10-31T22:10:04.503Z","updated_at":"2025-04-13T18:52:46.742Z","avatar_url":"https://github.com/smittytone.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FeatherClock 1.3.0 #\n\nThis repo contains code written for the [Adafruit Feather HUZZAH ESP32](https://www.adafruit.com/product/3405) and the [Raspberry Pi Pico W](https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf), all running [MicroPython](http://micropython.org/).\n\nIt is an attempt to replicate my [Electric Imp clock project](https://github.com/smittytone/Clock). It uses the [Adafruit FeatherWing](https://learn.adafruit.com/adafruit-7-segment-led-featherwings/overview) four-digit, seven-segment LED add-on, or any other HT16K33-based segment LED for that matter.\n\nCurrently, 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](#clock-settings), though. Adding a web UI, served locally or remotely, lies in a future phase of the project.\n\n**Note** I previously supported the [Adafruit Feather HUZZAH ESP8266](https://www.adafruit.com/product/2821), but this is no longer the case: its RTC is poor and it has too little memory. If you are using this board, you can find the code in the [`archive`](/archive) directory. I will instead be focusing on boards that are more modern.\n\n### Installation ###\n\n#### Pre-requisites ####\n\n*For ESP32 boards*\n\n1. Install `pyboard.py` from [GitHub](https://github.com/micropython/micropython/blob/master/tools/pyboard.py).\n1. Install `esptool.py` using `brew install esptool`\n\n*For Pico W boards*\n\n1. Install `pyboard.py` from [GitHub](https://github.com/micropython/micropython/blob/master/tools/pyboard.py).\n1. Download [MicroPython](https://micropython.org/resources/firmware/ADAFRUIT_QTPY_RP2040-20220618-v1.19.1.uf2) and drop the `.uf2` file onto the mounted `RP2` drive.\n\n#### App Installation ####\n\n*For ESP32 boards*\n\n1. Connect your assembled FeatherClock (Feather plus LED add-on).\n1. Run `ls /dev/cu*`\n    1. Note the Feather’s device file path.\n1. Update MicroPython:\n    * For ESP32:\n        1. `esptool.py --chip esp32 --port \u003cFEATHER_DEVICE_PATH\u003e erase_flash`\n        1. `esptool.py --chip esp32 --port \u003cFEATHER_DEVICE_PATH\u003e --baud 460800 write_flash -z 0x1000 esp32-20220618-v1.19.1.bin`\n1. `cd featherclock`\n1. Run `./install.sh \u003cFEATHER_DEVICE_PATH\u003e`\n1. Press `3` for an ESP32 device.\n1. Enter your WiFi SSID.\n1. Enter your WiFi password.\n1. After the code has copied, power-cycle your FeatherClock or press the **RESET** button.\n\n*For Pico W boards*\n\n1. Connect your assembled FeatherClock (Pico W plus HT16K33-based LED).\n1. `ls /dev/cu*`\n    1. Note the Pico’s device file path.\n1. `cd featherclock`\n1. Run `./install.sh \u003cFEATHER_DEVICE_PATH\u003e`\n1. Press `W` for a Pico W.\n1. Enter your WiFi SSID.\n1. Enter your WiFi password.\n1. After the code has copied, power-cycle your FeatherClock.\n\n### Clock Settings ###\n\nFor now, the clock’s prefs are set by sending over a `prefs.json` file with the following values:\n\n```json\n{ \"mode\":   \u003ctrue/false\u003e,   # 24-hour (true) or 12-hour (false)\n  \"colon\":  \u003ctrue/false\u003e,   # Show a colon between the hours and minutes readouts\n  \"flash\":  \u003ctrue/false\u003e,   # Flash the colon symbol, if it's shown\n  \"bright\": 10,             # Display brightness from 1 (dim) to 15 (bright)\n  \"bst\":    \u003ctrue/false\u003e,   # Auto-adjust for Daylight Saving Time\n  \"do_log\": \u003ctrue/false\u003e }  # Write log data to the file `log.txt` on the device\n```\n\nHaving installed `pyboard.py` as above, you send over prefs file using:\n\n```shell\npyboard.py -d \u003cFEATHER_DEVICE_PATH\u003e -f cp prefs.json :prefs.json\n```\n\nHowever, the `install.sh` script does this for you, and allows you to enter your WiFi credentials\n\nTo get `\u003cFEATHER_DEVICE_PATH\u003e`, you can add my Z Shell function [`dlist()`](https://gist.github.com/smittytone/15d00976df5b702debdcb3a8ae8f5bae) to your `.zshrc` file. After restarting your terminal, you can run:\n\n```shell\n./install.sh $(dlist)\n```\n\n### To Do ###\n\n- Web UI for clock settings control.\n\n### Release History ###\n\n- 1.3.0 *24 January 2023*\n    - Add experimental [Trinkey RP2040](https://www.adafruit.com/product/5056) version.\n    - Better resilience to WiFi connection loss.\n    - Better log file management.\n    - Update to latest HT16K33 drivers.\n    - Archive ESP8266 version.\n- 1.2.3 *23 February 2022*\n    - Better help in `install.sh`\n    - Device-side errors now issued to log file.\n    - Correct `pyboard` instructions.\n- 1.2.2 *5 February 2022*\n    - Style install script errors.\n    - Update `esptool.py` installation instructions.\n    - Add `dlist()` link.\n    - No application code changes.\n- 1.2.1 *13 September 2021*\n    - Clarify installation instructions for ESP32 and ESP8266 boards.\n    - Update install script.\n    - No application code changes.\n- 1.2.0 *26 August 2021*\n    - Fix for post time-check pauses\n    - Update `install.sh` to use MicroPython’s [`pyboard.py`](https://docs.micropython.org/en/latest/reference/pyboard.py.html).\n    - Update `install.sh` to copy `prefs.json` over if it is present in the working directory.\n- 1.1.0 *3 December 2020*\n    - Revised code.\n    - Matrix display version.\n- 1.0.10 *19 November 2020*\n    - Adds Feather Huzzah 32 version.\n- 1.0.9 *29 September 2020*\n    - Improve RTC time checks.\n    - Improve installation script.\n- 1.0.8 *6 September 2019*\n    - Add installation script.\n- 1.0.7 *25 April 2019*\n    - Add optional on-device JSON prefs (`prefs.json`) loading.\n- 1.0.6 *13 April 2019*\n    - Add app preferences structure.\n- 1.0.5 *10 April 2019*\n    - Correct the months used for BST checking.\n- 1.0.4 *9 April 2019*\n    - Various linting-suggested code improvements.\n- 1.0.3 *8 April 2019*\n    - Improve RTC updates by making NTP checks.\n- 1.0.2 \u0026mdash; *5 April 2019*\n    - Add regular RTC updates.\n- 1.0.1 *4 April 2019*\n    - Add disconnection indicator to display.\n    - Correct constant usage.\n- 1.0.0 *3 April 2019*\n    - Initial release.\n\n### Licence ###\n\nFeatherClock is copyright 2023, Tony Smith. It is released under the MIT licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmittytone%2Ffeatherclock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmittytone%2Ffeatherclock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmittytone%2Ffeatherclock/lists"}