Internet clock using nodemcu without RTC module
libraries to be installed:
- LiquidCrystal
- NTPClient
- TimeLib
Components Required:
- NodeMCU
- LCD 16x2
- Jumpwires
NOTE: First install Nodemcu Drivers in Arduino IDE.
Procedure:
- Goto sketch -> include library -> manage libraries.
- Now search for "LiquidCrystal" by arduino, then click on install.
- Now search for "NTPClient" by Fabrice Weinberg, then click on install.
- Now search for "TimeLib" by Paul stoffregen, then click on install.
- In the code, replace "WIFI_SSID" with your wifi name and replace "WIFI_PSWD" with your password.
- In line 16, replace 19800 with your respective UTC time zone For example, indian UTC zone is +5:30.... so, 56060=18000, 30*60=1800, 18000+1800=19800 for india.
- select your appropriate port and upload the code.
Connections:
LCD --> NodeMCU
- VSS --> GND
- VDD --? vin
- VO --> from pot
- RS --> D1
- RW --> GND
- E --> D2
- D0 --> No connection
- D1 --> No connection
- D2 --> No connection
- D3 --> No connection
- D4 --> D3
- D5 --> D5
- D6 --> D6
- D7 --> D7
- A --> 3.3v
- K --> GND
output: