ESP32-C3 Multi-Display Clock + Sensor Dashboard
This project is a compact multi-display clock and sensor dashboard built around the ESP32-C3 SuperMini. Four SSD1306 OLED displays are connected through a TCA9548A I²C multiplexer to create a dedicated layout for time and environmental data.
Two displays are dedicated to large clock digits, while the other two rotate through remote environmental data. To reduce power consumption, both display groups use timed wake/sleep cycles, with a lightweight Matrix-style falling-symbol animation shown briefly before the displays turn off.
Hardware Platform
- ESP32-C3 SuperMini (16-pin)
- TCA9548A I²C multiplexer
- 4 × SSD1306 OLED displays (128×64)
- HLK-LD2401 radar planned but currently removed
Power and wiring are already verified and working.
Display Layout
| Display | Function |
|---|---|
| OLED 1 | Hours (HH) |
| OLED 2 | Minutes (MM) |
| OLED 3 | Sensor type symbol |
| OLED 4 | Sensor value |
Displays are connected through TCA9548A channels 0–3.
Clock Function
- ESP32 connects to Wi-Fi and synchronizes time using NTP
- Clock synchronizes using a local NTP time source
- Large ~50px seven-segment digits
- Display 1 → HH
- Display 2 → MM
- Clock updates every second while the clock display group is active
Remote Sensor Data
Environmental data is retrieved from a separate monitoring device on the local network. The ESP32 periodically polls structured JSON data and extracts values from the bme2 sensor group.
Values used by the clock:
- temperature
- humidity
- pressure_mmhg
Values are rounded to integers before rendering.
Sensor data is fetched every 60 seconds and cached in memory.
Sensor Display Logic
| Display 3 | Display 4 |
|---|---|
| T | temperature |
| H | humidity |
| P | pressure |
- Displays 3 and 4 rotate every 5 seconds while active
- Display 3 shows large symbols: T / H / P
- Display 4 shows the corresponding numeric value
- Temperature and humidity use 2-digit rendering
- Pressure uses a custom large 3-digit font
If no successful sensor update occurs within 60 seconds, displays 3 and 4 show !.
Display Power Behavior
To reduce power use and add a distinctive visual effect, the displays do not remain active all the time. Instead, they operate in timed groups with a short pre-sleep animation before turning off.
Clock Displays (OLED 1 and OLED 2)
- Show large HH and MM for 5 seconds
- Run a lightweight Matrix-style falling-symbol animation for 5 seconds
- Turn off for 20 seconds
- The cycle then repeats
Sensor Displays (OLED 3 and OLED 4)
- Remain active during the first 15 seconds of each minute
- Rotate every 5 seconds through:
- T → temperature
- H → humidity
- P → pressure
- Run the same Matrix-style falling-symbol animation for the next 5 seconds
- Turn off for the rest of the minute
If remote sensor data becomes stale, displays 3 and 4 show ! instead of the normal symbol/value pair.
Wi-Fi Behavior
- Blocking reconnect strategy with NIC bounce
- Reconnect loop if Wi-Fi drops
- Stable connection verified before continuing
- Status logging printed to the Thonny console
Firmware Environment
Verified with:
- MicroPython v1.26.0 (ESP32-C3)
Key Libraries Used
- network
- ntptime
- socket
- json / ujson
- ssd1306
- machine.I2C
Current Baseline
main.py v1.6 – grouped sleep/wake scheduling with pre-sleep Matrix animation
- ✔ Wi-Fi connection using verified blocking reconnect strategy
- ✔ NTP clock sync from local server
- ✔ Large HH / MM rendering on dedicated OLEDs
- ✔ HTTP JSON polling for remote bme2 data
- ✔ Rotating T / H / P sensor display pages
- ✔ Large symbols on display 3
- ✔ Large centered numeric rendering on display 4
- ✔ Large 3-digit pressure rendering
- ✔ Timeout protection with ! indicator
- ✔ Grouped OLED sleep / wake scheduling
- ✔ Lightweight Matrix-style falling-symbol animation before display off