ESP8266 Based Network Clock and Weather Monitor

by rishabhh1 in Circuits > Electronics

3934 Views, 49 Favorites, 0 Comments

ESP8266 Based Network Clock and Weather Monitor

esp8266.jpg

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

Create an Account on Openweathermap.org

OpenWeatherMap1.png

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.

Hardware Connections

esp8266.jpg

On NodeMCU the connections are as follows.


NodeMCU OLED

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

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

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

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

Burn the Program From Arduino IDE

ESP8266 Based Network Clock and Weather Monitor

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.