An open API service indexing awesome lists of open source software.

https://github.com/androidcrypto/esp32_meteomatics_10_days_weather_forecast

An internet based Weather Station is running on an ESP32 device with ST7789 TFT display attached. The data is retrieved from Meteomatics.com Weather API for an individual location.
https://github.com/androidcrypto/esp32_meteomatics_10_days_weather_forecast

esp32 esp32-c3 esp32-c6 esp32-s3 meteomatics meteometrics-api spi st7789 weather weather-api

Last synced: 2 months ago
JSON representation

An internet based Weather Station is running on an ESP32 device with ST7789 TFT display attached. The data is retrieved from Meteomatics.com Weather API for an individual location.

Awesome Lists containing this project

README

          

# ESP32 Meteomatics 10 Days Weather Forecast on a ST7789 TFT Display

This is the accompanying repository for my article "**Create an Internet Weather Station with 10 days Forecast on an ESP32 with ST7789 TFT Display (Meteomatics.com)**" available here: https://medium.com/@androidcrypto/create-an-internet-weather-station-with-10-days-forecast-on-an-esp32-with-st7789-tft-display-ad7b9ab2bcad

The tutorial shows how to develop an Internet based Weather Station that displays a **10 days temperature and precipitation forecast** for nearly every place on earth. The weather data is obtained from the **Meteomatics.com Weather API**. They offer a **Free Basic Weather API plan with 15 basic weather parameters** that are enough for our purpose, and the **forecast is a short 1-hour interval**.

![Image 1](./images/esp32_tft_st7789_meteomatics_02_500h.png)

## Set up the TFT_eSPI library

Please don't forget to copy the file "*Setup703_ESP32_HWSPI_ST7789_240x320.h*" in the "User_Setups" folder of the TFT_eSPI library and edit the
"*User_Setup_Select.h*" to include the set up.

## Required Libraries
````plaintext
TFT_eSPI Version: 2.4.3 *1) (https://github.com/Bodmer/TFT_eSPI)

*1) In case you encounter any problems with the TFT_eSPI library you should consider to use my forked TFT_eSPI library that solved some problems, see link below
````

Forked TFT_eSPI library by AndroidCrypto: https://github.com/AndroidCrypto/TFT_eSPI

## Wiring of the display to the ESP32

As the display uses an SPI interface, we need to connect 8 wires, including the power supply lines. Please double-check the connections to avoid any damage to the parts.

![Image 2](./images/esp32_tft_st7789_meteomatics_01_600h.png)

````plaintext
Nr name ESP32 pin
1 GND GNDBUSY 21
2 VCC VCC is 3.3 volt, not 5 volt !RES 6
3 SCL 32 D/C 7
4 SDA 33 ('SDA' terminal is known as 'MOSI')
5 RST 25
6 D/C 26
7 CS 27
8 BL 13 ('BL' or 'BACKL' is the backlight pin connected to a PWM pin

Setup703_ESP32_HWSPI_ST7789_240x320.h
#define TFT_BL 13 // LED back-light
#define TFT_MISO 19 // 19 | not used/connected.
#define TFT_MOSI 33 // = SDA
#define TFT_SCLK 32
#define TFT_CS 27
#define TFT_DC 26
#define TFT_RST 25
````

If you are experienced with ESP32 and SPI (display) interfaces, you will notice that this pin setup matches none of the usual SPI ports ("HSPI" or "VSPI"). It was a result of a test whether the TFT_eSPI library can run those settings or not, and it worked. Of course, using the "hardware wired" SPI ports/pin is important when running time critical devices, but in my case it is working.

![Image 3](./images/esp32_tft_st7789_meteomatics_03_600h.png)

## Development Environment
````plaintext
Arduino IDE Version 2.3.6 (Windows)
arduino-esp32 boards Version 3.2.0 (https://github.com/espressif/arduino-esp32)
````