The DIY smart wall clock device
This repository is the Pac Man Version of the Clock, with a modified display date (dd-mm-yy)
Clockwise was an idea I had while working with 64x64 LED matrices. These displays are about the size of a wall clock and with the ESP32, besides controlling the content presented on the display we also gain the functionality of WiFi, Bluetooth, touch buttons and other sensors, which gives us basically a smart wall clock. From there I started to develop a platform to create the Clockfaces, or skins that the clock can have. The possibilities are many and I hope that with help from contributors, we can grow the options even more.
Currently, the clockfaces available are:
https://github.com/jnthas/cw-cf-0x01
https://github.com/jnthas/cw-cf-0x02
https://github.com/jnthas/cw-cf-0x03
https://github.com/jnthas/cw-cf-0x04
https://github.com/jnthas/cw-cf-0x05
The three main hardware components of Clockwise are:
- HUB75/HUB75E compatible LED matrix 64x64
- an ESP32; and
- a power supply of 3A+
With these components in hand, just follow the wiring instructions according to the library used, by default Clockwise uses the ESP32-HUB75-MatrixPanel-I2S-DMA but any Adafruit GFX compatible library should work. The default wiring connection is showed below.
In case you want something ready to use, I recommend Brian Lough's ESP32 Trinity, basically it's connecting the board and uploading the firmware, as simple as that.
- Go to https://clockwise.page/ and select the desired clockface
- Connect the ESP32 device on your computer's USB port
- Click on the Flash button
- A dialog will appear, select the correct USB port and click in Connect (screenshot)
- Select the INSTALL and INSTALL again (screenshot)
- Wait while the flash tool uploads the firmware and finish (screenshot)
The first time you run it, you need to configure the WiFi, for that connect to the Clockwise-Wifi
access point using the password 12345678
via your smartphone or laptop, click “Configure WiFi” and select your AP, put in your password and your timezone and save it. The timezone must be one of the listed here e.g. America/New_York, America/Sao_Paulo, Europe/Paris, Asia/Dubai, etc. so that the clock can connect to an NTP server to get the correct time. It is important to use a 2.4GHz WiFi, it will not work on 5GHz.
Clockwise uses PlatformIO as IDE, so the configuration is already done if you use the same. The Clockwise structure consists mainly of three folders
- clockfaces: contains the collection of available clockfaces. This folder is not included when compiling
- lib: contains the basic code for Clockwise to work and in addition a symbolic link to the current clockface
- src: contains the entry point for the clock code
.
├── clockfaces
│ ├── cw-cf-0x01
│ ├── cw-cf-0x02
│ └── cw-cf-0x03
├── lib
│ ├── cw-commons
│ ├── cw-gfx-engine
│ └── timeinwords -> ../clockfaces/cw-cf-0x02/
└── src
└── main.cpp
To create the symbolic link run the following command inside lib/ folder:
clockwise/firmware/lib$ ln -s ../clockfaces/cw-cf-0x02/ timeinwords
Or, if you prefer, you can get the same result by copying the desired clockface folder into lib/
The same way as web flashing, when connecting for the first time you will have to configure the wifi, follow the instructions in Configuring WiFi section above.
You can use the official Esspressif IoT Development Framekwork (aka esp-idf) to build and upload this project to an ESP32 device, including the ESP32-Trinity board.
Follow the Step By Step installation instructions.
Follow the instructions here.
git clone --recurse-submodules https://github.com/jnthas/clockwise.git
idf.py reconfigure
idf.py menuconfig
(selectClockwise Configuration
and choose the clockface)idf.py flash
idf.py monitor