I want to show you in this project how to build a nice looking weather station based on the Huzzah Feather boards for ESP8266 or ESP32 by Adafruit or ESP ThingPlus boards by Sparkfun. This weather station is equipped with a 2.8 inch ILI9341 touch display and can be mounted on top of a wall.
This project based on our AZ-Touch Feather kit. Please follow the attached assembly instruction.
The software based on the great work of Daniel Eichhorn. To make it compatible to AZ-Touch Feather equipped with an ESP8266 Feather board it was only needed to change the pin configuration. For ESP32 based boards we have changed Daniels libraries too. You will our changed fork here
OpenWeatherMapThe weather station is using weather information by OpenWeatherMap. To receive later data by the platform OpenWeatherMap you will need an own account. Sign up here to get an API key: https://docs.thingpulse.com/how-tos/openweathermap-key/
Installation of additional librariesYou have to install some additional libraries via Arduino Library Manager first:
Mini Grafx by Daniel Eichhorn
https://github.com/ThingPulse/minigrafx
Json Streaming Parser by Daniel Eichhorn
https://github.com/squix78/json-streaming-parser/blob/master/library.properties
simpleDSTadjust by neptune2
https://github.com/neptune2/simpleDSTadjust
For ESP8266 only:
ESP8266 WeatherStation by Daniel Eichhorn
https://github.com/ThingPulse/esp8266-weather-station
For ESP32 only:
ESP32 WeatherStation modified by Zihatec
https://github.com/HWHardsoft/ESP32_Weather_Station
You can also download the library also directly as ZIP file and uncompress the folder under yourarduinosketchfolder/libraries/
After installing the Adafruit libraries, restart the Arduino IDE.
Custom settings in settings.hIn the source code you will find a file named settings.h. Some changes in this file are required for customisation:
Wifi:
Please enter the SSID and pasword in the lines 25 and 26 of settings.h
#define WIFI_SSID "yourssid"
#define WIFI_PASS "yourpassword"
OpenWeatherMap API key:
Enter your API key in line 38 of settings.h
String OPEN_WEATHER_MAP_APP_ID = "your_api_key";
Your location:
Go to https://openweathermap.org/find?q=and search for a location. Go through the result set and select the entry closest to the actual location you want to display data for. It'll be a URL like https://openweathermap.org/city/2657896. The number at the end is what you assign to the constant below.
Enter the number and name of your location in line 45 and 46 of settings.h
String OPEN_WEATHER_MAP_LOCATION_ID = "2804279";
String DISPLAYED_CITY_NAME = "Ziesar";
Time zone:
Please choose your timezone in line 65 of settings.h
#define UTC_OFFSET +1
Run the demoPlease open this sample in the Arduino IDE. After compilation and upload you will see the current time and temperature of your location. Further more an weather forecast for the next few days is displayed. You can touch the monitor to change to other screens with additional information.
Comments