Introduction: ESP8266 Weather Server With LCD Display

About: Creator of things

Components

  • NodeMCU ESP8266 Chip or any other ESP8266 chip
  • 1602A 16x2 LCD Display
  • I2C LCD Backpack
  • Some wires and breadboard
  • DHT11 Temperature Sensor

Step 1: Attaching ESP8266 on Breadboard

  • This step is connecting the chip on to the breadboard .
  • Do not connect any wires yet.

The board should look like above picture without the wires .

Step 2: Connect I2C Backpack to LCD Display

In this step you are to connect the I2C backpack board to the main 1602A LCD Board.

The I2C Board exposes only four wire pins

Step 3: Temperature Sensor DHT11

Place the DHT11 Sensor on bread board as shown in image.

Step 4: Wiring Connections

Sensor Wiring

  • GND - ESP8266 GND Pin
  • VCC - ESP8266 3.3 V Pin
  • Data - ESP8266 RX Pin

LCD I2C Wiring

  • GND - ESP8266 GND
  • VCC - ESP8266 5V Pin
  • SDA - ESP8266 D2 Pin
  • SCL - ESP8266 D1 Pin

ESP8266

  • Connect with micro usb cable to laptop
  • Make sure you have the USB to UART Driver installed
  • Install Arduino and install the below libraries and boards
    • LiquidCrystal I2C
    • DHT
    • ESP8266 Board

  • Run the arduino IDE and look for ports in tools and select the USB - UART Port
  • Then from samples choose blink example, upload and test if LED blinks
  • Now copy the code - Weather Server LCD Code

Then publish it and voila it will start showing the temperature and humidity in your lcd . Make sure to change Wifi config in code.

Also if you open browser : http://iot-web.local/api

It will also show an api with same sensor data