How to create a complete weather station with ESP32

Last update: 01/12/2026
Author Isaac
  • Implementation of physical sensors such as the BMP280 and DHT22 for precise local measurements.
  • Integration of external APIs such as Open-Meteo to obtain global forecasts and data.
  • Data visualization using TFT, LCD screens or ePaper electronic ink technology.
  • Cloud storage and monitoring of climate variables via ThingSpeak.

Assembling an ESP32 with a DHT22 temperature and humidity sensor on a breadboard for a DIY weather station.

Building a homemade weather station is one of those projects that leaves you with a smile on your face. Not only is it a great way to learn electronics and programming , but it's also incredibly rewarding to see the data from your own garden or balcony appear in real time on a screen or your mobile phone.

The best part is that, thanks to the versatility of the ESP32, you can choose the path you like best: from something simple with a couple of basic sensors to an advanced AI system that tells you what to wear based on the weather. Let's see how to bring all these ideas to life so your project is perfect.

Recommended hardware and sensors

ESP32-S3 development board connected to a breadboard, central component of an IoT climate monitoring system.

For the station to be truly useful, you need components that measure different variables. A winning combination is the BMP280 sensor , which is excellent for measuring atmospheric pressure and temperature, along with the DHT22 sensor , which is much more reliable than the typical DHT11 for monitoring humidity and ambient temperature.

If you want to take it a step further, you can add a 3D-printed wind vane to measure wind speed. For a professional finish, using resin printers instead of traditional FDM printers provides exceptional precision and aesthetics for the anemometer's mechanical parts.

Data display options

Close-up of an ESP32 module, a microcontroller with integrated WiFi ideal for weather station projects.

Displaying the data on the computer's serial monitor is tedious, so ideally you should set up a visual interface. You have several options depending on what you're looking for:

  • ILI9341 TFT Screens: These are highly dynamic color displays. They allow you to create menus with title bars, vibrant colors to differentiate temperature (yellow) from pressure (green), and a very visual design.
  • ST7789 LCD Screens: Ideal for compact formats. They are perfect for creating dashboard-style interfaces where you can display icons and clear text.
  • Electronic ink (ePaper): Like those on the LilyGO T5, they are the most elegant and efficient option. They consume very little energy and allow you to display complex meteograms or AI-generated summaries without the screen being a nuisance at night.
  Voltage and frequency overclocking adjustments with Gigabyte EasyTune

Connectivity and data collection

Digital hygrometer showing ambient temperature and humidity, example of climate data visualization.

The ESP32 shines thanks to its integrated Wi-Fi. You have two ways to feed your station with data. The first is local reading , where the microcontroller directly reads the GPIO pins (such as pin 15 for the DHT22 or the I2C bus for the BMP280). The second is via external APIs , such as OpenMeteo, which doesn't require access keys and allows you to obtain the forecast for any city in the world through HTTP requests.

To prevent data loss, it's highly recommended to use platforms like ThingSpeak . This tool allows you to store temperature and wind history for free in the cloud, making it easy to create long-term graphs to analyze your area's climate.

Programming logic and useful functions

Set of digital climate monitors installed on a wall showing real-time weather variables.

In code, the smartest approach is to organize information into data structures (structs) . This allows you to group temperature, humidity, and pressure into a single object, making the program much cleaner and easier to maintain.

One particularly interesting feature you can implement is an advisory system . Based on the data collected, you can program the ESP32 to make decisions: if the temperature drops below 18 degrees or the wind is strong, the screen can indicate that a jacket is necessary; or if the probability of rain exceeds 40%, it can remind you to take an umbrella.

To prevent the screen from constantly flickering, it's essential to implement a refresh interval . For example, updating the data every 10 minutes is more than enough for weather conditions and prevents unnecessary wear and tear on components and excessive energy consumption.

From mounting physical sensors and using colorful displays to integrating global data via WiFi and cloud storage, setting up a weather station with ESP32 is a complete journey into the world of IoT that combines hardware, software, and a touch of creativity.

  The Great AI Funnel: Why HBM Memory Is the New Industry Challenge

FAQ

Which sensors are best for a weather station with ESP32?

It is recommended to combine the BMP280 for pressure and temperature with the DHT22 for humidity and temperature, thus achieving accurate and reliable measurements.

Is it necessary to pay for an API to obtain weather data?

It is not mandatory, as there are free options such as Open-Meteo that allow you to obtain forecasts and current data without the need for access keys.

How can I view the data outside of the computer?

You can use ILI9341 TFT displays for color, ST7789 LCDs for compact interfaces, or ePaper e-ink displays for minimal energy consumption.

Where can I store climate data to view the history?

The ThingSpeak platform is an excellent free option for storing variables such as wind speed and temperature in the cloud.

How do I connect the BMP280 sensor to the ESP32?

This sensor uses the I2C protocol, usually connecting to the SDA (GPIO 21) and SCL (GPIO 22) pins of the board.

Can I get the station to recommend clothes based on the weather?

Yes, it is possible to program decision logic that analyzes temperature and the probability of rain to display warnings about the use of jackets or umbrellas.

Isaac

Isaac

Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.