Software

Adafruit Feather HUZZAH with EPS8266 Arduino Libraries

If you're new to the Adafruit Feather HUZZAH EPS8266, 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!

Obtain Wunderground API Key

The arduino sketch uses the Wunderground API to pull weather data. You'll need to sign up and register an account with Wunderground.com It's completely free. Once registered and logged in, go to the API section of the site and create an API key. Copy it to your clipboard and save it. It will need to be pasted in the settings.h file.

Register Account

Goto the registation page and enter your email, desired username, password and agree to the terms of service.

Get Your API Key

Once registered, goto the API developer page and choose the Stratus Plan (it's free). Then, click on the "Purchase Key" button to continue.

Register Your API Key

Now you'll need to fill out the form by entering your credentials and agreeing to the terms of service. Click, Purchase Key when you're finished.

Retrive API Key

You'll be presented with your API Key. Copy and save it somewhere safe – You can always login and retrive your API key.

 

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 "Wunderground Underground" section. Here, you'll need to enter your Wunderground API key, desired language, country, and city. The format of the city includes the state, so reference the sample code below.

// Wunderground Settings
const boolean IS_METRIC = false;
const String WUNDERGRROUND_API_KEY = "api_key_here";
const String WUNDERGRROUND_LANGUAGE = "EN";
const String WUNDERGROUND_COUNTRY = "US";
const String WUNDERGROUND_CITY = "FL/Royal_Palm_Beach";

Sleep / Power Conservation

The display is programmed to turn off after 10 seconds. When the display is tapped, it will automatically turn back on. You can adjust the "awake" time by adjust the delay value in the code (found in the weather_station_color.ino file).

 // for AWAKE_TIME seconds we'll hang out and wait for OTA updates
    for (uint16_t i=0; i<AWAKE_TIME; i++  ) {
      // Handle OTA update requests
      ArduinoOTA.handle();
      delay(10000);
      yield();

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.

Initial Startup

The first time the Arduino Sketch runs, it will turn the ESP8266 into an access point. The display will instruct you to connect to the ESP8266 WiFi access point.

Connect to ESP8266

You should see the ESP8266 listed in your available WiFi network. Select "ESP8962600". No password is needed.

Configure WiFi

Once connected, your computer will automatically launch a Join WiFi login page. You'll have the option to scan for available WiFi networks or enter it manually.

Enter WiFi Credentials

Choose your preferred WiFi network and enter your password. Then click on the save button.

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 2017-04-13 at 05.06.16 PM Published on 2016-12-07 at 09.00.05 AM