A WiFi-enabled LED matrix clock for ESP8266 that displays time from multiple timezones. Features automatic NTP synchronization, DST handling, and a web-based configuration interface.
- ๐ Multiple Timezone Support: Display time from up to 6 different timezones (UTC, CST, EST, PST, IRST, and more)
- โฐ Automatic Time Sync: NTP synchronization ensures accurate time
- ๐ฐ๏ธ Configurable NTP Server: Pick from popular pools (pool.ntp.org, Google, Cloudflare, NIST,
ir.pool.ntp.org) or use your own - ๐ DST Handling: Automatic Daylight Saving Time adjustments for US timezones
- ๐ฑ Web Configuration: Easy-to-use web interface for settings
- ๐ Password-Protected Admin: HTTP Basic Auth on the web UI (default
admin/admin) - ๐ WiFi Manager: Automatic WiFi configuration portal on first boot
- ๐จ Customizable Display: Adjustable brightness and 12/24-hour format
- ๐ 180ยฐ Rotation: Flip the display for upside-down mounting without rewiring
- ๐บ Animated Display: Smooth scrolling animations for timezone names and time
- ๐พ Persistent Settings: Settings saved to EEPROM
- ESP8266 (NodeMCU, Wemos D1 Mini, or similar)
- MAX7219 LED Matrix Display (4 modules, FC16 hardware type)
- Jumper wires for connections
- 5V power supply (USB or external adapter)
| ESP8266 Pin | MAX7219 Pin | Description |
|---|---|---|
| D5 | CLK | Clock |
| D7 | DIN | Data In |
| D8 | CS | Chip Select |
| 5V | VCC | Power |
| GND | GND | Ground |
Note: Pin definitions can be modified in
config.h.
Choose PlatformIO (recommended for professional workflow) or Arduino IDE (traditional approach).
Why PlatformIO?
- โ Automatic library management (no manual installation)
- โ Multiple board configurations in one file
- โ Faster incremental builds
- โ Better code intelligence and debugging
- โ Professional development workflow
Quick Start:
-
Install:
- Download and install Visual Studio Code
- Install the PlatformIO IDE extension
-
Open Project:
- Open this folder in VS Code
- PlatformIO will auto-detect
platformio.ini
-
Build & Upload:
Using VS Code GUI (easiest):
- Click โ (Build) โ โ (Upload) โ ๐ (Monitor)
Using Command Line:
pio run # Build pio run -t upload # Upload to device pio device monitor # Open serial monitor
Supported Boards (pre-configured):
d1_mini- Wemos D1 Mini (default)nodemcu- NodeMCU v2esp12e- Generic ESP8266
To upload to a specific board:
pio run -e nodemcu -t uploadCommon PlatformIO Commands:
pio run -t clean # Clean build files
pio device list # List connected devices
pio pkg update # Update librariesSetup Steps:
-
Install Arduino IDE (version 1.8.x or newer)
-
Add ESP8266 Board Support:
- Go to
FileโPreferences - Add this URL to "Additional Board Manager URLs":
http://arduino.esp8266.com/stable/package_esp8266com_index.json - Go to
ToolsโBoardโBoards Manager - Search for "ESP8266" and install
- Go to
-
Install Required Libraries (via Library Manager):
- WiFiManager by tzapu
- MD_Parola by majicDesigns
- MD_MAX72XX by majicDesigns
- NTPClient by Fabrice Weinberg
- ESP8266WiFi (included with board support)
- EEPROM (included with board support)
-
Configure Arduino IDE:
- Select board:
ToolsโBoardโESP8266 BoardsโNodeMCU 1.0(or your board) - Set upload speed:
ToolsโUpload Speedโ115200
- Select board:
-
Upload:
- Open
MultiZoneMatrixClock.ino - Select your COM port
- Click Upload button
- Open
- Power on the ESP8266
- The device creates a WiFi access point: "MultiZoneClock"
- Connect to this network with your phone/computer
- A configuration portal opens automatically (or navigate to
192.168.4.1) - Enter your WiFi credentials and connect
- Find the device IP: Check Serial Monitor (115200 baud) or your router's device list
- Access web interface: Open the IP address in your browser
Navigate to your device's IP address in a web browser to access settings. The page is protected by HTTP Basic Auth โ the browser will prompt for credentials on first load (default admin / admin).
- Timezones: Enable/disable which timezones to display
- Display Intensity: Adjust brightness (0-15)
- Time Display Duration: How long to show each timezone (seconds)
- Rotate display 180ยฐ: Flip the matrix so the clock reads correctly when the unit is mounted upside-down (no rewiring needed)
- Time Format: Toggle between 12-hour (AM/PM) or 24-hour format
- NTP Server: Choose a preset (
pool.ntp.org,time.google.com,time.cloudflare.com,time.nist.gov,ir.pool.ntp.org) or select Customโฆ to type your own hostname - Admin Password: Change the password used for the web UI. Leave the field blank to keep the current password.
- WiFi Configuration: Reconfigure WiFi connection
๐ Change the default password. The first thing you should do after setup is open the Security section and set a new admin password.
- Enabled Timezones: EST, IRST
- Display Intensity: 5
- Time Format: 24-hour
- Time Display Duration: 10 seconds per timezone
- Display Rotation: 0ยฐ (not flipped)
- NTP Server:
pool.ntp.org - Admin Username / Password:
admin/admin
- Timezones: Edit
timezone.cpp - Hardware pins: Edit
config.h - Display settings: Edit
config.h
Single Timezone Mode (when only 1 timezone is enabled):
- Time displays statically with blinking colon
- Updates every second
Multiple Timezone Mode (when 2+ timezones are enabled):
- Timezone name scrolls up
- Brief pause
- Time scrolls in from left
- Time displays for configured duration
- Time scrolls out to right
- Repeats for next timezone
- Automatic NTP sync with the configured server (default
pool.ntp.org; selectable from preset pools or a custom hostname) - Periodic updates to maintain accuracy
- Automatic DST calculation for US timezones
๐ฎ๐ท Iran users: select
ir.pool.ntp.orgfrom the NTP Server dropdown. It resolves to Iran-zone servers in the global NTP Pool project, which gives you a faster, in-country sync than the generic pool.
3D printable enclosure files are included in the stl/ directory, optimized for Bambu Lab A1 Mini.
| File | Description | Quantity |
|---|---|---|
FRONT.3mf |
Front panel/enclosure | 1 |
FRONT Wemos D1 Mini.3mf |
Front with Wemos D1 Mini mount | 1 |
BACK.3mf |
Back panel/enclosure | 1 |
FRAME FRONT.3mf |
Front frame | 1 |
FRAME BACK.3mf |
Back frame | 1 |
2 x MATRIX HOLDER.3mf |
Matrix display holder | 2 |
- Layer height: 0.2mm (standard) or 0.16mm (fine)
- Infill: 15-20%
- Material: PLA or PETG
- Supports: As needed
Error: "display.h: No such file or directory"
- Solution: Make sure all
.cppand.hfiles are in the same directory as the.inofile - Don't manually create
src/orinclude/directories for Arduino IDE
- Can't connect to AP: Reset device and try again
- Portal doesn't open: Manually navigate to
192.168.4.1 - Can't find device IP: Check Serial Monitor (115200 baud) or router
- No display: Check wiring, especially power (5V) and ground
- Garbled text: Verify pin connections match
config.h - Too dim/bright: Adjust intensity in web interface (0-15)
- Wrong time: Ensure WiFi is connected and NTP can sync
- DST not working: Check timezone DST settings in
timezone.cpp - Timezone offset wrong: Verify offset in
timezone.cpp
Upload failed:
pio device list # Check available devices
pio run -t clean # Clean and rebuild
pio pkg install --force # Reinstall librariesPort not found: Make sure CH340/CP2102 drivers are installed
Edit timezone.cpp:
// Add new timezone to timezones array
timezones[5] = {"TZNAME", offset_seconds, uses_dst};Update TZ_COUNT in config.h if adding more than 6 timezones.
Modify config.h:
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW // Change module type
#define MAX_DEVICES 4 // Number of modules
#define CLK_PIN D5 // Clock pin
#define DATA_PIN D7 // Data pin
#define CS_PIN D8 // Chip select pinEdit config.h:
const unsigned long WAIT_DURATION = 2000; // Pause between animations (ms)
const unsigned long STATIC_TIME_DURATION_DEFAULT = 10000; // Time display duration (ms)MultiZoneMatrixClock/
โโโ MultiZoneMatrixClock.ino # Main sketch (Arduino IDE)
โโโ *.h, *.cpp # Source files (Arduino IDE)
โ โโโ config.h # Pins, EEPROM layout, Settings struct
โ โโโ display.{h,cpp} # Matrix animation + rotation
โ โโโ timezone.{h,cpp} # Timezone catalogue + DST
โ โโโ webserver.{h,cpp} # Web UI + HTTP Basic Auth
โ โโโ html_utils.{h,cpp} # Reusable HTML/form helpers
โโโ src/ # Source files (PlatformIO โ mirror of root .cpp)
โ โโโ main.cpp # Main entry point
โ โโโ display.cpp # Display manager
โ โโโ timezone.cpp # Timezone manager
โ โโโ webserver.cpp # Web server manager
โ โโโ html_utils.cpp # HTML helpers
โโโ platformio.ini # PlatformIO configuration
โโโ docs/ # Documentation and images
โโโ stl/ # 3D printing files
โโโ README.md # This file
File Usage:
- Arduino IDE: Uses
.inoand root*.cpp/*.hfiles (ignoressrc/folder) - PlatformIO: Uses
src/folder and root*.hfiles
- MCU: ESP8266 @ 80MHz, 4MB Flash
- Display: MAX7219 8x8 LED Matrix (4 modules = 32ร8)
- Communication: SPI for display, WiFi 802.11 b/g/n
- Storage: EEPROM for persistent settings
- Time Protocol: NTP (Network Time Protocol)
- RAM Usage: ~48.6% (39,808 bytes)
- Flash Usage: ~37.1% (387,995 bytes)
| Task | Command |
|---|---|
| Build | pio run |
| Upload | pio run -t upload |
| Monitor | pio device monitor |
| Clean | pio run -t clean |
| List devices | pio device list |
| Update libs | pio pkg update |
| Specific board | pio run -e nodemcu -t upload |
- Baud Rate: 115200
- Shows: WiFi status, IP address, NTP sync, debug info
This project is open source. Feel free to modify and distribute.
Contributions are welcome! Please feel free to submit a Pull Request.
- Built with Arduino framework for ESP8266
- Uses excellent libraries from the Arduino community
- Inspired by the need for a simple, elegant multi-timezone clock
For issues, questions, or contributions, please open an issue on GitHub.
Enjoy your Multi-Zone Matrix Clock! โฐ๐

