See also clocklet.co.uk
This project is the firmware and client apps for clocks made by @samscam including:
- Custom 17x5 SK9822 LED Matrix display
- Timekeeping: ESP32 (DS3231 as backup)
- Synchronisation: NTP
- Microcontroller: ESP32 Wrover on custom "Clockbrain" board
- Weather source: Darksky (expect this to be changed very soon)
Earlier prototypes used RGBDigit (WS2812B) 7-segment display and Adafruit Feather Huzzah32. These run a bit glitchy.
- Display: Waveshare epaper 2.9inch https://www.waveshare.com/2.9inch-e-paper-module.htm
- Timekeeping: GPS
- Synchronisation: GPS
- Power management to run from a lipo battery
- Microcontroller: Adafruit Feather Huzzah32
It's all a work in progress.
- Time
- Weather
- Utterances
- Interesing displays and animation
- Ambient light sensing
- Power management (Mrs Clockety)
To build the the firmware:
- Clone the repo including submodules
- Install platformio and your editor of choice - I'm using vscode.
- Open up the firmware from the
Embedded
directory - Pick the correct environment for the device you want to build for (by setting it in the first line of
platformio.ini
or by invoking tasks for the specific environment in the editor/cli) this will probably beclockbrain
- Plug the device in to your machine over USB
- Check that the device is available to your system... on MacOS it's normally
/dev/cu.SLAB_USBtoUART
- Build and upload (platformio should download the dependencies if it hasn't done so already)
- Note that API keys are encrypted with gitcrypt
You can connect to the clocklet's serial port from a computer with various tools (like screen, miniterm or putty) and see the Clocklet logging.
The important thing to note is that the baud rate of the serial connection is 115200
.
The Clocklet serial port on Mac and Linux will generally be available as /dev/cu.SLAB_USBtoUART
- you can do an ls /dev/cu.*
before and after plugging it in to eliminate possibilities.
Then open it up in your tool of choice:
screen /dev/cu.SLAB_USBtoUART 115200
miniterm.py /dev/cu.SLAB_USBtoUART 115200
- Install
esptool
On MacOS this can be done with homebrew: brew install esptool
On Linuxes it's probably available from apt-get install esptool
or whatever package manager you're using.
-
Download the bin file of the firmware image you want from the releases section on here.
-
Plug in the Clocklet and figure out which port it is on - probably something like
/dev/cu.SLAB_USBtoUART
(that's what we'll use here but replace with whatever it is on your system) -
Erase the flash (including settings)
esptool.py -b 115200 -p /dev/cu.SLAB_USBtoUART erase_region 0x9000 0xFF7000
-
Flash the new firmware image:
esptool.py -b 115200 -p /dev/cu.SLAB_USBtoUART write_flash 0x10000 clockbrain.bin
While we are here you can also use esptool to just erase settings (equivalent of doing a factory reset from the app):
esptool.py -b 115200 -p /dev/cu.SLAB_USBtoUART erase_region 0x9000 0x5000
Requires Xcode 14 To build, open via the workspace rather than the Xcode Project.
Contains an experimental library for gluing CoreBluetooth to Combine and SwiftUI via PropertyWrappers called "CombineBluetooth". This may get spun out into a separate project in the future - but for ease of development right now it's in here.
- Android client
- Enclosure design (3d printable)
- Hardware design
This is distributed under the MIT License
MIT License
Copyright (c) 2017-2020 Sam Easterby-Smith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.