Project showcase
Weather Forecast Displayer

Weather Forecast Displayer © GPL3+

Weather forecast for 7 days and current (local) weather data displayer using the Arduino Opla IoT Kit

  • 3,907 views
  • 3 comments
  • 8 respects

Components and supplies

Apps and online services

About this project

Detailed Description:

  • The Opla unit running this project can run completely wireless, needing only a WiFi connection and a battery as power source.
  • Weather forecast for 7 days (including the current day) is obtained from http://www.7timer.info (documentation available here: http://www.7timer.info/doc.php). By using GET request and the provided API, the weather forecast data is obtained in JSON format and then parsed.
  • The weather forecast is currently set to the location of the city of Prague (Czech Republic) (50.076° N, 14.438° E). A different location can be used by modifying the used GET request.
  • The weather forecast contains for each day: minimum and maximum temperature, the weather type (e.g. clear, cloudy, partial rain, light snow) and the wind type (e.g. calm, light, moderate).
  • The considered weather types are: clear, partly cloudy, mostly cloudy, cloudy, humid, light rain, occasional showers, isolated showers, rain, light snow, snow, freezing rain. For the exact description (cloud percentage, precipitation rate) of these types, see the documentation from the weather provider which is available here: http://www.7timer.info/doc.php .
  • The considered wind types are: calm, light, moderate, fresh, strong, gale, storm, hurricane. For the wind speeds associated to each of these types, see the documentation from the weather provider which is available here: http://www.7timer.info/doc.php .
  • Together with the weather forecast, the date (i.e. day and month) and the week day are also displayed.
  • The weather forecast and its date are displayed on a blue background.
  • The current (local) weather data contains: temperature, humidity and pressure.
  • The current (local) weather data is obtained from the temperature, humidity and pressure sensors available on the Opla unit (MKR IoT Carrier).
  • The current (local) weather data is displayed on a green background.
  • For obtaining the weather forecast data, the Opla unit has to be connected permanently to a WiFi network.
  • The credentials for the WiFi network (i.e. SSID and password) are stored in the arduino_secrets.h file.
  • The WiFi module is set to work in low power mode.
  • The Opla unit can work powered from a battery or through the USB cable.
  • The Touch Buttons0 (left), 2 (center) and 4 (right) are used for switching the displayed weather foreast to the previous or next day or to the current weather (see more information in the next section).
  • After 10 seconds of inactivity (i.e. no buttons pressed), the weather forecast for the current day will be shown again on the screen (if not already displayed).
  • Every 60 minutes the weather data will be updated by making a new GET request, receiving the response and reading the sensors' data.
  • The updating process is marked with the displayed text "Updating the Weather Data" on a red background.

How To Use:

  • Clone the repository
  • Add in the arduino_secrets.h file the credentials (i.e. SSID and password) of your WiFi network
  • Upload the code to your Opla unit (i.e. Arduino MKR WiFi 1010)
  • Wait for a couple of seconds for the connection to the WiFi network to be established
  • If the connection was successful, the message "Updating the Weather Data" will be displayed on the Opla unit's screen. Otherwise, the screen will remain black
  • After the updating is done, the weather forecast for the current day is shown on the display
  • By pressing on the Touch Button 0 (i.e. the leftmost one) the weather forecast for the previous day (if possible) will be displayed
  • By pressing on the Touch Button 4 (i.e. the rightmost one) the weather forecast for the next day (if possible) will be displayed
  • By pressing on the Touch Button 2 (i.e. the central one) the current (local) weather data will be displayed
  • After 10 seconds of inactivity, the weather forecast for the current day will be shown again (if not already displayed).

Project Files:

  • wfdOplaNode.ino: The main file of the project. Contains the setup function (which initializes the Serial port, the WiFi module and the MKRIoTCarrier) and the loop functions (in which the periodic update of the weather data is triggered and the status of the buttons is read and some actions are triggered accordingly).
  • arduino_secrets.h: The file which contains the WiFi network credentials (i.e. SSID and password)
  • weatherData.h: The file which contains the declarations of the functions used for getting, processing and displaying the weather data forecast and the current weather data.
  • weatherData.cpp: The file which contains the definitions of the functions used for getting, processing and displaying the weather data forecast and the current weather data.

Future Improvements:

  • The WiFi module is set to work in low power mode but for saving even more power, after a specific time (e.g. 10 minutes) the display can be switched off and only when a touch button is pressed, it will be switched on again. I didn't implement this feature because I would like to see all the time the weather forecast for the current day, without needing to press any button.
  • Some other energy saving optimizations and settings could be found and implemented.

Code

Comments

Similar projects you might like

Weather Forecast Clock Using Old Alarm and Arduino

Project showcase by LenkaDesign

  • 11,981 views
  • 21 comments
  • 48 respects

DIY Simple Weather Forecast Device

Project tutorial by Mirko Pavleski

  • 5,046 views
  • 2 comments
  • 8 respects

Weather forecast station with LYT led bulb and IFTTT

Project tutorial by Team Authometion

  • 4,166 views
  • 0 comments
  • 2 respects

Weather Station v.1.0

Project showcase by derapados

  • 22,933 views
  • 5 comments
  • 51 respects

Arduino-based touchscreen advanced weather station

Project showcase by antiElectron

  • 5,790 views
  • 2 comments
  • 21 respects

Weather Station for Drones

Project tutorial by Giuseppe Caccavale

  • 21,532 views
  • 4 comments
  • 56 respects
Add projectSign up / Login