Features
Connections
Read more- Displays real-time clock (12-hour format) with AM/PM indicator.
- Shows current date and weekday.
- Synchronizes time via NTP server.
- Uses I2C 16x2 LCD for display.
- Auto-updates time based on Indian Standard Time (IST, UTC+5:30).
Component
Quantity
ESP8266 NodeMCU 1
16x2 I2C LCD 1
Jumper Wires As needed
Circuit DiagramESP8266 Pin LCD Pin
3.3V /5v VCC
GND GND
D2 (GPIO4) SDA
D1 (GPIO5)
SCL
Installation & Setup1. Install Required LibrariesMake sure you have the following libraries installed in Arduino IDE:
- LiquidCrystal_I2C (Download)
- NTPClient (Download)
- ESP8266WiFi (Comes with ESP8266 board package)
- Open the provided code in Arduino IDE.
- Replace
your_SSID
andyour_PASSWORD
with your WiFi credentials. - Select ESP8266 NodeMCU as the board.
- Upload the code and open the Serial Monitor (115200 baud rate).
- WiFi Connection: Connects ESP8266 to a WiFi network.
- NTP Synchronization: Fetches time from an NTP server (pool.ntp.org).
- Time Conversion: Converts 24-hour format to 12-hour format with AM/PM.
- Display Update: Updates the LCD every second with time, date, and weekday.
Comments