Skip to content

MGuerrero31416/ESP32-NTP-LED-CLOCK

Repository files navigation

ESP32-S3 WiFi LED Clock

WiFi-connected NTP clock using an ESP32-S3 and WS2818 addressable-LED 7-segment display. Connects to WiFi, syncs time via NTP, and shows hours:minutes with a slowly cycling rainbow colour effect.

Features

  • WiFi Connection: Connects to a configured WiFi network (static or DHCP)
  • NTP Time Sync: Automatic time synchronisation from pool.ntp.org
  • WS2818 7-Segment Display: 4-digit HH:MM clock on addressable RGB LEDs (GPIO 1)
  • Rainbow Colour Cycling: Hue rotates through the full spectrum
  • Blinking Colon: Colon blinks every second to indicate time is running

Photo

ESP32-S3

Hardware Requirements

  • Microcontroller: ESP32-S3
  • LED Display: WS2818 addressable-LED 7-segment module on GPIO 1

GPIO Summary

Pin Component Signal
GPIO 1 WS2818 LED strip Data In

Configuration

Edit WiFi credentials in main/User_Settings.c:

const char USER_WIFI_SSID[] = "Your_SSID";
const char USER_WIFI_PASS[] = "Your_Password";

Timezone is set in main/main.c (CLOCK_TZ_POSIX), default: ICT-7 (Bangkok, UTC+7).

Build Requirements

  • ESP-IDF v5.5.1
  • Python 3.11+
  • xtensa-esp-elf toolchain

Building

idf.py build

Flashing

idf.py flash -p <PORT>

Replace <PORT> with your serial port, e.g. COM4 on Windows or /dev/ttyUSB0 on Linux/macOS.

Monitoring Serial Output

idf.py monitor -p <PORT>

Project Structure

Development Notes

Troubleshooting

WiFi connection fails

Check SSID/password in main/User_Settings.c, then verify WiFi init/connection flow in main/wifi_helper.c.

About

WiFi NTP clock on ESP32-S3 with WS2818 addressable-LED 7-segment display and rainbow colour cycling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors