|
1 | | -> [2024-04-21] [Version 1.4.2 released!](https://github.com/jnthas/clockwise/releases/tag/v1.4.2) Check the [change log](https://github.com/jnthas/clockwise/blob/main/CHANGELOG.md#142---2024-04-21) to see the fixes and new features added. Be part of the [Clock Club](https://github.com/jnthas/clock-club) and create your own clockface using Canvas. |
| 1 | + **[Latest version 1.4.2 released!](https://github.com/jnthas/clockwise/releases/tag/v1.4.2)** | [See full change log](https://github.com/jnthas/clockwise/blob/main/CHANGELOG.md#142---2024-04-21) |
2 | 2 |
|
3 | | -[](https://github.com/jnthas/clockwise/actions/workflows/clockwise-ci.yml) |
| 3 | + |
4 | 4 |
|
5 | | - |
| 5 | +--- |
6 | 6 |
|
7 | | -> The DIY smart wall clock device |
| 7 | +**Clockwise** is an open-source smart wall clock that you can easily build yourself. |
| 8 | +It only needs: |
8 | 9 |
|
9 | | -Clockwise was an idea I had while working with 64x64 LED matrices. |
10 | | -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 |
11 | | -WiFi, Bluetooth, touch buttons and other sensors, which gives us basically a smart wall clock. |
12 | | -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. |
| 10 | +- 64x64 RGB LED Matrix (HUB75 or HUB75E) |
| 11 | +- ESP32 dev board |
| 12 | +- 5V 3A power supply |
| 13 | +- Jumpers |
13 | 14 |
|
14 | | -### ⏰ New Clockfaces |
15 | | -Create a new custom Clockface starting from [here](https://github.com/jnthas/cw-cf-0x00) or take a look at the [Clock Club](https://github.com/jnthas/clock-club) and discover how to create new ones using just a JSON file with no coding. |
| 15 | +To simplify assembly, you can also use the [**WiseShield-32 DIY PCB kit**](https://www.elecrow.com/clockwise-diy-kit.html) — created in partnership with Elecrow especially for Clockwise. |
16 | 16 |
|
| 17 | +--- |
17 | 18 |
|
18 | | -## Available clockfaces |
| 19 | +## Features |
19 | 20 |
|
20 | | -Mario Bros. Clock | Time in Words |
21 | | -:----------------:|:------------: |
22 | | - |  |
23 | | -https://github.com/jnthas/cw-cf-0x01 | https://github.com/jnthas/cw-cf-0x02 |
| 21 | +- Real-time clock with customizable themes ("Clockfaces") |
| 22 | +- Web-based interface for configuration |
| 23 | +- Open-source hardware and firmware |
| 24 | +- Compatible with various PCBs or just simple wiring |
| 25 | +- Community-driven |
24 | 26 |
|
25 | | -World Map Clock | Castlevania Clock Tower |
26 | | -:--------------:|:----------------------: |
27 | | - |  |
28 | | -https://github.com/jnthas/cw-cf-0x03 | https://github.com/jnthas/cw-cf-0x04 |
| 27 | +--- |
29 | 28 |
|
30 | | -Pacman | Pokedex |
31 | | -:-----:|:------: |
32 | | - |  |
33 | | -https://github.com/jnthas/cw-cf-0x05 | https://github.com/jnthas/cw-cf-0x06 |
| 29 | +## Quick Start |
34 | 30 |
|
35 | | -Canvas | Description |
36 | | -:-----:|:------: |
37 | | -<img id="cw-cf-0x07" src="https://github.com/jnthas/cw-cf-0x07/raw/main/cf_0x07_thumb.jpg" width="200" alt="Canvas Clockface"> | Canvas is a special type of Clockface<br>that is capable of rendering different<br>themes described in a JSON file.<br>Find out more [here](https://github.com/jnthas/clockwise/wiki/Canvas-Clockface). |
38 | | -https://github.com/jnthas/cw-cf-0x07 | |
| 31 | +### 1. Required Hardware |
39 | 32 |
|
| 33 | +If you want to build it from scratch, you will need at least these components below. Follow the instructions on [Wiki]() to assemble it. |
| 34 | +- 64x64 RGB LED matrix (HUB75 or HUB75E) |
| 35 | +- ESP32 Dev Board |
| 36 | +- 5V 3A power supply |
| 37 | +- Jumpers |
40 | 38 |
|
41 | | -## Driving the led matrix |
| 39 | +Alternatively, we created a custom PCB that simplifies this process a lot. The kit includes not only the PCB but all components including sensors to make your clock smarter. Check the [WiseShield-32 PCB kit](https://www.elecrow.com/clockwise-diy-kit.html) out now! |
42 | 40 |
|
43 | | -The three main hardware components of Clockwise are: |
44 | | -- HUB75/HUB75E compatible LED matrix 64x64 |
45 | | -- an ESP32; and |
46 | | -- a power supply of 3A or more |
| 41 | +### 2. Flash Firmware |
47 | 42 |
|
48 | | -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](https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA#2-wiring-esp32-with-the-led-matrix-panel) but any Adafruit GFX compatible library should work. The default wiring connection is showed below. |
| 43 | +- Go to: [https://clockwise.page](https://clockwise.page) |
| 44 | +- Follow the on-screen steps to flash Clockwise and configure WiFi |
49 | 45 |
|
50 | | - |
| 46 | +For detailed instructions: |
| 47 | +👉 [See Wiki: Getting Started](https://github.com/jnthas/clockwise/wiki/%F0%9F%9A%80-Getting-Started) |
51 | 48 |
|
52 | | -[Full size](https://github.com/jnthas/clockwise/blob/gh-pages/static/images/display_esp32_wiring_bb.png) |
| 49 | +--- |
53 | 50 |
|
54 | | -- In case you want something ready to use, I recommend Brian Lough's [ESP32 Trinity](https://github.com/witnessmenow/ESP32-Trinity), basically it's connecting the board and uploading the firmware, as simple as that. |
55 | | -- If you want a designed PCB, I recommend this project from @Alexvanheu. It's compatible with HUB75/HUB75E led matrices and already tested with Clockwise https://github.com/Alexvanheu/Mario-Clock-PCB-ESP32 |
56 | | -- [ESP32 D1 Mini D1 RGB Matrix Shield](https://github.com/hallard/WeMos-Matrix-Shield-DMA) from @hallard is another option |
| 51 | +## Clockfaces Gallery |
57 | 52 |
|
| 53 | +You can choose from many creative Clockfaces — or make your own: |
58 | 54 |
|
59 | | -## How to change the clockface (web flashing) |
| 55 | +Mario Bros | Words | World Map | Castlevania | Pacman | Pokedex | Canvas |
| 56 | +:--:|:--:|:--:|:--:|:--:|:--:|:--: |
| 57 | +[](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) | [](https://github.com/jnthas/cw-cf-0x06) | [](https://github.com/jnthas/cw-cf-0x07) |
60 | 58 |
|
61 | | -1) Go to https://clockwise.page/ and select the desired clockface |
62 | | -2) Connect the ESP32 device on your computer's USB port |
63 | | -3) Click on the Flash button |
64 | | -4) A dialog will appear, select the correct USB port and click in Connect ([screenshot](https://github.com/jnthas/clockwise/raw/gh-pages/static/images/usb-step1.png)) |
65 | | -5) Select the INSTALL and INSTALL again ([screenshot](https://github.com/jnthas/clockwise/raw/gh-pages/static/images/usb-step2.png)) |
66 | | -6) Wait while the flash tool uploads the firmware and finish ([screenshot](https://github.com/jnthas/clockwise/raw/gh-pages/static/images/usb-step3.png)) |
67 | | -7) From the version 1.1.0, click in NEXT on step 6, Improv will start looking for available WiFi networks to connect |
68 | | -8) Select your local network (must be a 2.4GHz) and enter with your password ([screenshot](https://github.com/jnthas/clockwise/raw/gh-pages/static/images/usb-step4.png)) |
69 | | -9) If connection was successful, a message with button VISIT DEVICE will pop up and you can visit the Clockwise setting page ([screenshot](https://github.com/jnthas/clockwise/raw/gh-pages/static/images/usb-step5.png)) |
| 59 | +> Canvas is a special type of Clockface that is capable of rendering different themes described in a JSON file. More about **Canvas Clockface**: [Wiki page](https://github.com/jnthas/clockwise/wiki/Canvas-Clockface) |
70 | 60 |
|
| 61 | +--- |
71 | 62 |
|
72 | | -### Configuring only WiFi |
73 | | -After flashing your clockface, you will have a step to configure the WiFi. But in case you change your access point or password, you can set up just the WiFi connecting the Clockwise on USB, opening https://clockwise.page and clicking in Flash button, a window will pop up with a few options where you can re-configure your WiFi network ([screenshot](https://github.com/jnthas/clockwise/raw/gh-pages/static/images/usb-step6.png)) as well as open the Settings page to change preferences using button VISIT DEVICE. Remember: it is important to use a 2.4GHz WiFi, it will not work on 5GHz. |
| 63 | +## How to Build |
74 | 64 |
|
| 65 | +You can start developing and customizing Clockwise in two different ways: |
75 | 66 |
|
76 | | -### Settings page |
77 | | -The settings page have the following options |
78 | | -- *Timezone*: The timezone must be in the format 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. |
79 | | -- *NTP Server*: By default the clock will sync with `pool.ntp.org`, but you can configure your own (local) NTP server to be used. |
80 | | -- *Swap Blue/Green pins*: Some displays have the RGB order different, in this case RBG. You can use this options to change the order. |
81 | | -- *Display Bright*: Change the display bright. |
82 | | -- *Use 24h format*: You can choose between 20:00 or 8:00PM in your device. |
83 | | -- *Automatic Bright*: Once you connect a LDR in the ESP32, Clockwise will be able to control the display bright based on the ambient light. Check the [Wiki]( |
84 | | -https://github.com/jnthas/clockwise/wiki/Connecting-the-LDR) about that. |
85 | | -- *NTP Server*: Configure your prefered NTP Server. You can use one of the [NTP Pool Project](https://www.ntppool.org/) pools or a local one. Default is `time.google.com`. |
86 | | -- *LDR Pin*: The ESP32 GPIO pin where the LDR is connected to. The default is 35. There is a link there where you can read the current value of LDR and test if it's working. |
87 | | -- *Posix Timezone String*: To avoid remote lookups of ezTime, provide a Posix string that corresponds to your timezone ([explanation](https://github.com/ropg/ezTime#timezones-1)). Leave empty to obtain this automatically from the server. |
88 | | -- *Display Rotation*: Allows you to rotate the display. This is useful if you need to adjust the direction in which cables protrude relative to the displayed image. |
| 67 | +1. **PlatformIO** — advanced usage for developers |
| 68 | +2. **ESP-IDF** — for full control |
89 | 69 |
|
90 | | -## How to change the clockface (PlatformIO) |
| 70 | +👉 [Both are described in the Flashing section of the Wiki](https://github.com/jnthas/clockwise/wiki/%F0%9F%92%BE-Flashing-the-Firmware) |
91 | 71 |
|
92 | | -Clockwise uses PlatformIO as IDE, so the configuration is already done if you use the same. The Clockwise structure consists mainly of three folders |
93 | | -- clockfaces: contains the collection of available clockfaces. This folder is not included when compiling |
94 | | -- lib: contains the basic code for Clockwise to work and in addition a symbolic link to the current clockface |
95 | | -- src: contains the entry point for the clock code |
| 72 | +--- |
96 | 73 |
|
97 | | -``` |
98 | | -. |
99 | | -├── clockfaces |
100 | | -│ ├── cw-cf-0x01 |
101 | | -│ ├── cw-cf-0x02 |
102 | | -│ └── cw-cf-0x03 |
103 | | -├── lib |
104 | | -│ ├── cw-commons |
105 | | -│ ├── cw-gfx-engine |
106 | | -│ └── timeinwords -> ../clockfaces/cw-cf-0x02/ |
107 | | -└── src |
108 | | - └── main.cpp |
| 74 | +## Advanced Configuration |
109 | 75 |
|
110 | | -``` |
111 | | -Clone this repository and then run the following command to clone the clockface submodules |
| 76 | +Clockwise offers a flexible set of options that you can adjust through its built-in Settings page: |
112 | 77 |
|
113 | | -``.../clockwise$ git submodule update --init firmware/clockfaces`` |
| 78 | +* **WiFi settings** — easily update your network details without reflashing |
| 79 | +* **Timezone & NTP server** — sync the clock accurately for your region |
| 80 | +* **Display brightness** — manual or automatic control (with optional LDR sensor) |
| 81 | +* **Display rotation** — adjust orientation to match your wall setup |
| 82 | +* **Clockface selection** — switch between installed Clockfaces or use Canvas themes |
| 83 | +* **RGB order correction** — fix color mismatch on certain LED matrices |
| 84 | +* **POSIX timezone string** — fine-tune timezone behavior |
114 | 85 |
|
115 | | -To create the symbolic link run the following command inside lib/ folder: |
| 86 | +👉 See the full guide here: [Advanced Configuration Wiki](https://github.com/jnthas/clockwise/wiki/%E2%9A%99%EF%B8%8F-Configuring-Clockwise) |
116 | 87 |
|
117 | | -``.../clockwise/firmware/lib$ ln -s ../clockfaces/cw-cf-0x02/ timeinwords`` |
| 88 | +--- |
118 | 89 |
|
119 | | -Or, if you prefer, you can get the same result by copying the desired clockface folder into lib/ |
| 90 | +## Community & Contributions |
120 | 91 |
|
121 | | -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. |
| 92 | +- Join the [Clock Club](https://github.com/jnthas/clock-club) to create your own Clockfaces |
| 93 | +- Contributions and pull requests are welcome! |
| 94 | +👉 [Contributing Guide](https://github.com/jnthas/clockwise/wiki/%F0%9F%A4%9D-Contributing) |
122 | 95 |
|
123 | | -## How to change the clockface (esp-idf) |
| 96 | +--- |
124 | 97 |
|
125 | | -You can use the [official Esspressif IoT Development Framekwork (aka esp-idf)](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/) to build and upload this project to an ESP32 device, including the [ESP32-Trinity board](https://esp32trinity.com/). |
| 98 | +## License |
126 | 99 |
|
127 | | -### Install esp-idf |
128 | | -Follow the [Step By Step installation instructions](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/#installation-step-by-step). |
129 | | - |
130 | | -### Setup the environment variables |
131 | | -Follow the [instructions here](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/#step-4-set-up-the-environment-variables). |
132 | | - |
133 | | -### Clone and build this project |
134 | | -* `git clone --recurse-submodules https://github.com/jnthas/clockwise.git` |
135 | | -* `idf.py reconfigure` |
136 | | -* `idf.py menuconfig` (select `Clockwise Configuration` and choose the clockface) |
137 | | -* `idf.py flash` |
138 | | -* `idf.py monitor` |
| 100 | +Clockwise is released under the MIT License. |
0 commit comments