Online Weather Display Using OpenWeatherMap

Introduction: Online Weather Display Using OpenWeatherMap

About: #BnBe is a platform to help teach electronics no matter what the age or skill level. We’re currently designing a wide range of products from beginner level kits to industry-standard microcontroller platforms.

As a follow up to the first DIY project (Room Thermometer), we write a sketch that communicates with an online weather service (OpenWeatherMap) which provides the weather data for just about any city. We use this information to display the temperature, humidity and weather conditions to an OLED module.
BONUS: We also talk to the TeamTrees website and obtain the live tree count as an example to talk to webservers that do not provide a JSON response.

Step 1: Watch the Video

Since this project requires you to set up and obtain an API key along with other tasks, I would recommend you watch the video to get an understanding of how it all flows together. The video also breaks down the sketch to make it easier to understand.

Step 2: Download & Update the Sketch

The video covers this topic step-by-step but you need to obtain the API key from the OpenWeatherMap website in order to access the weather information. Once that is done, download the sketch and update it and don't forget to update your city details.

Link To Sketch:

Relevant Links:

Step 3: Wire Up the OLED Module & Upload

Simply wire up the OLED module to the Nano 33 IoT board and upload the sketch.

Step 4: Bonus: Obtaining the Live Tree Count

The video covers the logic behind this, but you simply need to download the sketch, add your WiFi network credentials and upload it to your board. There is no need to obtain an API key for this sketch.

Link to the sketch:

Step 5: Share It With the World

Don't forget to share this with us and the world by tagging us on social media. Also, don't forget to subscribe to our channel to watch more videos and leave future build ideas while you're at it :) Here are some relevant links in case you would like to learn more about us. Thank you for your support!

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Teach With Tinkercad Contest

      Teach With Tinkercad Contest



    Question 2 months ago on Step 5

    I tried to install this interresting sketch on a ESP8285 but I receive this error message
    "static PinStatus digitalRead(uint8_t pin);"

    I also tried to install it with the choice of MKR WIFI 1010 and the message become
    "Unsupported ARM920T architecture"

    have you an idea how to install it on my ESP8285?