Introduction: ESP8266 Based Network Clock and Weather Monitor

Short and Simple Weekend Project with ESP8266 and 0.96'' 128x64 OLED Display.

The device is a network clock i.e. fetches time from ntp servers. It also Displays weather information with icons from openweathermap.org

Parts Required:

1. ESP8266 Module (Any one, I used NodeMCU)

2. 0.96" OLED (I2C Based)

3. Jumper Wires

4. Bread Board

5. USB Cable to attach ESP8266 to the computer

Step 1: Create an Account on Openweathermap.org

Creating an account on openweathermap.org is straight forward.

Create an account by clicking on signup.


Login and go to the API Tab. Note your API Key.

Step 2: Hardware Connections

On NodeMCU the connections are as follows.


NodeMCU OLED

3V ---------------> Vcc

Gnd ---------------> Gnd

D1 ---------------> SCL

D2 ----------------> SDA

Step 3: Burn the Program From Arduino IDE

Open the Program in Arduino IDE.

Select the ESP8266 Module that you are using from the Boards menu and Upload the code to the module.

The code updates the weather information every 10 minutes.

All the weather Icons are placed in the icon.h file.

Icon code is returned from the the call that we make to openweathermap.org

I have used a very crude parsing logic to extract the weather information from the json that is received.

You can used the json library for Arduino if you wish to.