WiFi Weather Display With ESP8266




About: Making and sharing are my two biggest passions! In total I've published hundreds of tutorials about everything from microcontrollers to knitting. I'm a New York City motorcyclist and unrepentant dog mom. My ...

Every morning when I get ready to walk the dog, I want to know what the weather is like outside. Is it raining? Cold enough for the dog's sweater? From my current NYC apartment, it's even hard to tell if I'll need sunglasses when I step outside. I usually use my phone for checking the weather, but wouldn't it be nice to have some wall decor that provides this info at a glance?

I built this IoT weather display using a small shadow box, some RGBW NeoPixel LEDs, and an Adafruit Feather Huzzah ESP8266 with seven-segment display FeatherWing. Weather data is tracked using IFTTT, an incredibly rich (and free ) API gateway, which sends data to the cloud service Adafruit IO, which is then accessed by the Arduino program running on the microcontroller.

Before attempting this project, you should be familiar with Arduino, and you can take my free Arduino Class, or Randy's LEDs & Lighting Class or Electronics Class if you need to brush up on any of the basic skills.

For this project, you will need:

As an alternative to the Feather Huzzah, you can also use the NodeMCU board (USB programmable) or Huzzah ESP8266 breakout, for which an FTDI cable is required to upload new programs (use the standard 7-segment backpack rather than the FeatherWing version).

Step 1: Software & Hardware Setup

Before you dive into the code for this project, you should first make sure you've got your Arduino software set up properly to program the board you are using, which involves installing the SiLabs USB driver and installing ESP8266 board support (explained in more detail in the Feather Huzzah tutorial):

  • Go to Arduino-> Preferences...
  • Look for a text field labeled "Additional Boards Manager URLs:" and paste the following URL into the field (separate multiple URLs with commas if applicable):
  • Click OK
  • Go to Tools->Board-> Boards Manager...
  • Search for ESP8266 and click the Install button in the box "esp8266 by ESP8266 Community" when it shows up

Huzzah ESP8266 boards have an LED connected to pin 0, and you can find a sample blink sketch by navigating to File->Examples->ESP8266->Blink, or copy it from here:

void setup() {
  pinMode(0, OUTPUT);
void loop() {
  digitalWrite(0, HIGH);
  digitalWrite(0, LOW);

Plug in your USB cable to the board and configure your settings under the Tools menu as follows:

  • Board: Adafruit Huzzah ESP8266
  • CPU Frequency: 80MHz
  • Flash Size: 4M (3M SPIFFS)
  • Upload Speed: 115200
  • Port: whichever one ends in SLAB_USBtoUART (Mac) or COMx (Windows)

Click the Upload button to send the program to your board. This will take several seconds (longer than you are used to with Arduino Uno). After complete, the onboard LED should start blinking.

While the Feather Huzzah auto-detects when it's being sent a new program, other ESP8266 boards may require a sequence of button presses to get into bootloader mode.

Do not proceed until you've successfully uploaded a blink test program to your board.

Follow the assembly instructions to solder up and test your FeatherWing seven-segment display.

Step 2: Code & Circuit Diagram

For this project, you will need the following Arduino Libraries. Easily search and install each one using the Library Manager by navigating to Sketch->Include Library->Manage Libraries... or download from Github and install the old fashioned way:

Download the code attached to this step and open the file "weatherdisplay_example.ino" in the Arduino IDE. Navigate to the config.h tab in the editor and customize to your own personal data:

  • SSID (Network name)
  • Wifi password
  • Adafruit IO username
  • Adafruit IO key

Upload the customized code to your board. You may want to prototype your circuit on a solderless breadboard, or use female headers on your NeoPixel wires to plug them directly to the long header pins on the Feather. You can build the circuit now or after the next few configuration steps, your choice.

Step 3: Temperature Data Feed

Log in to Adafruit IO and create a new feed called "hightemp".

Log in to IFTTT.com and create a new applet. Select Weather Underground as the trigger ("this"), and configure it to retrieve today's weather report at a particular time each day.

For the second part of the applet ("that"), select Adafruit as the action service, then "Send data to Adafruit IO" (you will have to link your IFTTT account to Adafruit IO the first time). Select your feed named "hightemp" from the dropdown menu and click the +Ingredient button to select HighTempFahrenheit (or your preferred value).

You should now have an applet that sends today's high temperature to the hightemp feed on Adafruit IO every day at the same time. Since that can be a long time from the current time, feel free to adjust the trigger time for testing, or add testing data directly to the feed in Adafruit IO.

This code displays the numerical value from the feed on the 7-segment display:

Step 4: Weather Condition Feed

Create another new feed on Adafruit IO for tracking the current weather condition called "precipitation". Rather than create one applet that sends weather data daily, I created four applets, one each for the supported condition variables: clear, cloudy, rain, and snow. Whenever the condition changes, the current condition is passed to the feed. Although only four simple conditions are used to trigger the action, the resulting feed data is much more varied.

Here's one part of the code that evaluates the weather condition string and lights up the NeoPixels accordingly (I used the example under File->Examples->08.Strings->StringComparisonOperators program as a reference):

 String forecast = data->toString();

if (forecast.equalsIgnoreCase(String("Rain")) || forecast.equalsIgnoreCase(String("Light Rain") || forecast.equalsIgnoreCase(String ("Rain Shower"))){ Serial.println("precipitation in the forecast today"); pixels.setPixelColor(0, pixels.Color(0, 30, 200, 20)); pixels.setPixelColor(1, pixels.Color(0, 30, 200, 20)); pixels.setPixelColor(2, pixels.Color(0, 30, 200, 20)); pixels.setPixelColor(3, pixels.Color(0, 30, 200, 20)); pixels.setPixelColor(4, pixels.Color(0, 0, 0, 255)); pixels.setPixelColor(5, pixels.Color(0, 0, 0, 255)); pixels.setPixelColor(6, pixels.Color(0, 0, 0, 255)); pixels.setPixelColor(7, pixels.Color(0, 0, 0, 255)); }

Step 5: Circuit Prototype

You can play around with the positioning of the various display elements before permanently attaching them-- for instance the perma-proto board fits in the corner, so the placement of the Feather will determine its position relative to the corner-- adjust as you see fit! I created triangles within the shadow box using pieces of scrap cardboard, and masking tape to temporarily secure the pixels in place. To prototype different color effects, you can send test data to the device by manually adding entries to the two feeds. Once you like the way it looks, you can proceed to finalizing the circuit a bit more.

Step 6: Shadow Box Circuit Assembly

Solder the Feather and NeoPixel wires to the perma-proto board and trim the extra long headers with flush diagonal cutters (wear eye protection, they go flyin'!). Leave the tape securing the NeoPixels or replace it with some hot glue to hold the strips to the shadow box backing plate.

Step 7: Finishing Touches

Cut, drill, or file a hole in the edge of the backing plate so the USB cable can exit the back of the shadow box. To make it sit flush with the wall, you will also need to cut a groove in the frame to accommodate the USB cable.

Thanks for reading my Instructable! If you use it to build something, I'd love to see it in the comments!

If you like this project, you may be interested in some of my others:

To keep up with what I'm working on, follow me on YouTube, Instagram, Twitter, Pinterest, and Snapchat.

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017



  • Beauty Tips Contest

    Beauty Tips Contest
  • Pets Challenge

    Pets Challenge
  • Fandom Contest

    Fandom Contest

29 Discussions


15 days ago on Introduction

Hi Becky

An excellent design and I love the diffused light effect. Could this weather forecaster be further adapted to show other forthcoming weather conditions, such as thunderstroms, strong winds, hail storms and snow?

Spencer (Engalnd, UK)

1 reply

Reply 14 days ago

Hi Spencer, sure, the display can be modified to show any weather data you can find and pipe to it. The weather app in IFTTT is limited in what it displays, but perhaps there is another weather data service or API you could adapt to your use.


Question 1 year ago on Step 2

Hi! I"m getting an error:

weatherdisplay_example:75: error: 'lightPixels' was not declared in this scope

lightPixels(pixels.Color(0, 0, 0, 0));


any help is appreciated! :)

1 answer

Answer 4 months ago

Recognizing that this is a 10 month old question, but answering in case it's still a mystery or anyone else has the same problem. I suspect you're not using the Arduino IDE, in which case you need to declare function prototypes before they can be used. I suggest adding void lightPixels(uint32_t);somewhere after your variable declarations and before your setup function. You'll have to add similar lines for any other helper functions as well, like void handleCondition(AdafruitIO_Data);.


Tip 4 months ago

Want to know what other weather condition terms you can handle? See the WU API Phrase Glossary (scroll to Current Conditions...) for a full list. I don't even want to think about some of those... Maybe a spinning white animation for funnel clouds? But "Blowing Widespread Dust?" "Volcanic Ash?" nope. nope nope nope


6 months ago

I noticed that the system doesn't load initial values from IO upon startup; the handlers only get called when the values are changed (i.e. when the ifttt events are triggered). It took a little digging, but there's mention of ->get() at the very end of Adafruit's MQTT API documentation. I added [feedname]->get() calls at the end of setup() and that gives me data immediately after connecting. Now to design my display...

1 reply

Reply 6 months ago

Rad, thank you! I was not clever enough to figure out how to make it do that.


Question 7 months ago on Step 2

Hi Becky, I seem to be getting a strange error with the example code, it doesn't like the AdafruitIO_Data pointers in the void functions. I get a variable or field declared void error, and if I set it as an int, I get a not declared in this scope error. I have all the libraries installed and haven't changed anything. Did you have any experience with this issue?

2 answers

Answer 7 months ago

Fixed the issue, just needed function prototypes at the top :)


Reply 7 months ago

Glad you got it sorted! I haven't looked at this code in a while but the weather display is in my house and still working great.


2 years ago

Would it be possible to have it display the forecasted high temp of the day instead of the current temp?

1 reply

Reply 2 years ago

It does display the forecasted high temp (not the current temp), but the weather condition display updates more frequently (triggered whenever the condition changes)


Very nice, and well explained.

How do you get the seven segment display to shine so brightly through black paper?

Is it special paper?

Does the color of paper/color of led matter?

3 replies


The color of the led may not matter if you know which color does what. I didn't read the whole tutorial yet, but I believe that the colors are coded as follow:

- upper left yellow: sunny

- upper right white: clouds

- bottom left blue: rain

With these you can have pretty much everything a meteo station can send you, except maybe snow.


Reply 2 years ago

I coded it to mix in some white with the blue when it's snowing. =D


It's not black paper, it's plain white printer paper. It looks darker in the photos than its neighbor segment because those segments are illuminated and the corner with the numerical display is not.


2 years ago

I love the elegant simplicity of this. Your use of the shadow boxes for displays in this and other projects is not something I would have thought of, and has given me some ideas.

Have you thought of maybe incorporating a temp sensor like the DS18B20 into this to get your actual outside temperature? I have one outside my study window on a thin wire that fits through the closed window without obstructing the rubber seal.

Excellent work, you write some of the clearest Instructables I have seen so far.


2 years ago

Hi. I usually look out the window to check out the weather (   ), JOKE.. but true.
Your Weather-forecaster is in both design and simplycity the most style’ish.
Don’t change anything in it, it’s “just” as stream-lined and functional as it can be.
Nice job

2 replies

Reply 2 years ago

Because I live on a low floor in a tall building (facing an interior courtyard), I actually can't easily see the sky from the windows and there aren't any windows near the door/coathooks. So, good for you that you can see the current weather condition by looking out the window, I can't so I built this. =\


Reply 2 years ago

Oh.. it was just a joke with the comment of just looking out.

Your 'Ible is Fantastic in it's both design & function