Software

WUnderground no longer provides API keys for free so we've updated the code in this guide to use the newer OpenWeatherMap code, the assembly is the same but the final graphics will differ!

Adafruit Feather HUZZAH with ESP8266 Arduino Libraries

If you're new to the Adafruit Feather HUZZAH ESP8266, you'll need to install the board and libraries in order to compile and upload code to it using the Arduino IDE. Follow the guide below to install the board and libraries, then come back here once you've successfully installed it.

The guide walks you through installing the Arduino IDE as well.

Download & Install Arduino Libraries

You'll need to download and install a few libraries in order to compile the sketch. You can manually install them by downloading the direct links below, or use the Library Manager in the Arduino IDE to search and install them.

Arduino Sketch

Download the Arduino Sketch by clicking the green button below. 

The original software was written by Daniel Eichhorn @ http://blog.squix.ch we made some changes to make it plug-n-play with this setup!

Settings 

You'll need to manually adjust a few settings in order to properly display weather conditions from your area. In the settings.h file, look for the "WIFI SSID" section. Here, you'll need to enter your WiFi SSID & Password

// Setup
#define WIFI_SSID "yourssid"
#define WIFI_PASS "yourpassw0rd"
#define WIFI_HOSTNAME "ThingPulse-weather-station-color"

Then, lower down find

String OPEN_WEATHER_MAP_LOCATION = "Zurich,CH";

and change it to say

String OPEN_WEATHER_MAP_LOCATION = "New York,US";

Finally, you can set your timezone at this section by adjusting the UTC offset for your location - if you have to deal with DST, there's also code to set that as well!

#define UTC_OFFSET +1
struct dstRule StartRule = {"CEST", Last, Sun, Mar, 2, 3600}; // Central European Summer Time = UTC/GMT +2 hours
struct dstRule EndRule = {"CET", Last, Sun, Oct, 2, 0};       // Central European Time = UTC/GMT +1 hour

// Settings for Boston
// #define UTC_OFFSET -5
// struct dstRule StartRule = {"EDT", Second, Sun, Mar, 2, 3600}; // Eastern Daylight time = UTC/GMT -4 hours
// struct dstRule EndRule = {"EST", First, Sun, Nov, 1, 0};       // Eastern Standard time = UTC/GMT -5 hour

Uploading Sketch to Adafruit HUZZAH with ESP8266

Once your adjustments have been made, you can upload the sketch to the board. Before you do, goto Tools > Board and select Adafruit HUZZAH ESP8266. Then, check the varies options below:

  • CPU Frequency: 80 MHz
  • Flash Size: 4M (3M SPIFFS)
  • Upload Speed: 115200

Plug in a microUSB data cable into the board and connect it to a USB port on your computer. Under the Port section, in the Tools menu, you should see the board listed. (If you're on a Mac, it will be listed as /dev/cu.SLAB_USBtoUART.)

With those options selection, you can now upload the code to the board by clicking the upload button. You'll see the status of the upload in the black window on the bottom of the Arduino IDE.

Connected ESP8266 WiFi

The ESP8266 will then automatically download the assets (weather condition icons) to the board. Once it's finished, it'll automatically display the date, time, weather, and moon phases. Pretty cool, huh? :-)

Last updated on Jun 19, 2018 Published on Dec 07, 2016