Connected weather station

Author avatarDigijeunes | Last edit 4/02/2020 by Digijeunes

Connected weather station Dtmwno.jpg
In this tutorial you will learn how to set up a weather station based on ESP32, and how to monitor its readings remotely, via the Blynk app as well as via a website.

Video overview



Step 1 - Wiring up the components

Connect the sensors as follows:

Light sensor

One end to 3V

the other end to the 10kohm resistor which in turn is connected to GND. the same end of the LDR is also connected to pin D34 on the ESP32


3V →3V on the ESP32 board


SDA→D21 pin on ESP32

SCL→D22 pin on ESP32




VCC→3V on ESP32

OUT→D34 on ESP32

Step 2 - Program the ESP32 board

Launch Arduino IDE.

Select your ESP32 board from the Tools menu.

Make sure you’ve  also selected the correct Port.

Upload this code on to the board.

If you open the serial monitor (set the baud rate to 9600), you should be able to view the values recorded by the different sensors.

Step 3 - Monitor the weather station remotely via Blynk App

Blynk app enables us to monitor the values recorded by the weather station remotely, directly on our smartphone, regardless our distance from the weather station.

All we need is the blynk app and an internet connection. In this project you’ll learn how to monitor the values recorded by the LDR sensor and the DHT11 sensor only.

Create a new project in the Blynk app

After you’ve download the app and you’ve successfully logged into your account, start by creating a new project.

Choose Your Hardware

Select the hardware model you will use. If you are following this tutorial you ll probably be using an ESP32 board.

Auth Token

Auth Token is a unique identifier which is needed to connect your hardware to your smartphone. Every new project you create will have its own Auth Token. You’ll get Auth Token automatically on your email after project creation. You can also copy it manually. Click on devices section and selected required device:

And you’ll see token :

Set up the Blynk app

You will need to create a project on blynk which is tailored for the purpose of monitoring the parameters recorded by the weather station.

Grab 3 value display widgets.

Configure them one by one. The first will receive V6 as input, the second V5 and the third V0. You ll notice that they re all set to push mode.

Step 4 - Program the ESP32 board

Launch arduino IDE and open this program.

Select the board you re using from the Tools menu, as well as the correct Port.

Upload the code.

If upload is successful, you should be able to see a message from Blynk on the serial monitor.

Notes and references

List of parts

1x ESP32 board + usb power cable

1x DHT11 sensor

1x light sensor

1x 10 Kohm resistor

1x CJMCU CCS811 sensor

several jumper wires

a number of breadboards or a PCB (if you decide to do some soldering)

female headers (if you decide to do the soldering).