Introduction: Weather Station NODEmcu I2c HD44780
Do you want to know the current weather? This article will show you
how to build a simple weather station with NODEmcu board and HD44780 i2c display. The board uses the ESP8266 chip in order to connect to the internet and we are going to program it using the Arduino IDE. The project gets weather data from the openweathermap.org website and displays some of the data on the display. The display is connected to Nodemcu via the i2c module, so connection is very simple. All we need is the address of module.
Step 1: Connection:
NODEmcu to Arduino:
D1 to SCL
D2 to SDA
Vin to Vcc
GND to GND
Warning: The i2c module needs 5 volts for proper operation.
Step 2: Installation of the ESP8266 Board:
Copy link to Additional Board Manager URLs ( Arduino IDE File -> Preferences )
Now, add NODEmcu board to Arduino IDE. Open Board Manager ( Arduino IDE ->Board: “……….” -> Board Menager )
Step 3: Libraries:
OK, your board is already added. Now we need to add libraries needed in
the program. Add Liquid crystal_i2c, Open Tools -> Manager Libraries and type LiquidCrystal_i2c in the search engine and find the library “LiquidCrystal_i2c by frank de Brabander”.
All you need is a JsonArduino library, Open Adruino IDE -> Sketch
-> Include Library -> Add .ZIP Library …. And select file ArduinoJson-6.x.zip
Step 4: Address Module I2c:
If you do not know the address of your module, upload the following code
to the board and open Serial Monitor there will appear the address. Mine is 0x3F.
Step 5: Configure Weather Station:
Now open the sketch Weather_Station_i2c_NODEmcu.ino and go to the configure section.
Enter your address module i2c:
// initialize the library LiquidCrystal_I2C lcd( address module i2c ,2,16);
Enter your network name:
const char* ssid = “NAME NETWORK”;
Enter your network password:
const char* password = “PASSWORD NETWORK”;
Now, enter www.openweathermap.org register on the site and go to the pricing tab and click FREE FREE “get API KEY and start”. Go to home.openweathermap.org and open the APIKEY and copy it.
Then search for your city and from the link copy number city to skech https://openweathermap.org/city/2643743 city number 2643743.