Menu Close

Weather Station on ESP8266 using LUA

Robo India presents tutorial to make an online weather station using ESP8266 WiFi module and LUA platform.

 

1. Introduction:

This tutorial explains how to make an online weather station using ESP8266 wifi module and LUA programming. It is an stand alone weather station that collect weather updates from openweathermap.org and displays the retrieved information on 16X2 LCD.

1.1 Prerequisites

You need to have basic understanding of ESP8266, below mentioned tutorials of Robo India may help you out in this.

1. This tutorial explains configuration and setup of ESP8266

2. This tutorial explains basic of ESPlorer.

3. I2C Scanner : This tutorial will help you to know i2C LCD address.

4. Using i2C LCD on ESP8266 : This tutorial will help you to use i2C LCD on ESP8266.

2. Circuit

This tutorial does not require any special except i2c LCD connections and connections to Computer to uploading program, all these circuits are explained in above mentioned tutorials.

3. Getting API Key From OpenWeather

1. go to http://openweathermap.org/ and create an account if you do not have one.

2. Login to your account account you will find API Key in the HOME>SETUP tab.

3. Copy and paste this key to a separate notepad file will will need it later.

3.1 Getting city code from OpenWeather

Search your city in the search box at openwheather.org. Click on your city on search result and here is your city code as highlighted in the following image.

Another way of getting city code –

http://bulk.openweathermap.org/sample/city.list.json.gz

Download list of city codes from the above file. After downloading extract the file and open the same in Notepad or Wordpad and find the code of your city.

As you know the city code please note the same where you noted API Key we will need it later.

4. Programming 

Fill the following information and generate the programme. Extract the downloaded zip file and upload all three files to your ESP8266.

Reset your device and you will see flashing Weather Update on the LCD connected to ESP8266 wifi Module.

If you have any query please write us at support@roboindia.com

Thanks and Regards
Content Development Team 
Robo India
http://roboindia.com


Leave a Reply