Thursday, 28 April 2016

The Adafruit Feather boards are a great size and the growing ecosystems of add-ons and compatible boards is really impressive.

This blog describes a quick-start project for the ESP8266 Huzzah Feather board with a Neopixel featherwing to provide a simple status indicator.

We're going to use the ESP8266 to scan for available WiFi networks and alert us if any insecure (open, with no encryption and requiring no password) networks are found. This might be a useful sensor for the corporate environment where sysadmins want to ensure nobody is introducing un-protected access routes into their network. Red LEDs indicate that a possible rogue AP has been found, all green means everything is ok.

Hardware Setup

Depending on where you purchased you boards from, you may need to solder header pins. I added female headers to the Huzzah and males to the NeoPixel FeatherWing so that the two simply connect together like a couple of mating beetles!

The Neopixel_FeatherWing needs to have a jumper set to work with the EXP8266 Huzzah Feather. Using a sharp knife, break the preset jumper on pin 16 and then solder across the jumper on pin 15.

Software Setup

3. Download the Adafruit Neopixel library for Arduino. Download the zip file from the Github page and unzip it. Then rename the extracted folder to Adafruit_Neopixel and copy it to your Arduino libraries folder (on a Mac that's in /home/<user>/Documents/Arduino/libraries).

4. Add the ESP8266 board package as an additional board into the editor's preferences.

5. Now go to Tools -> Board: -> Boards Manager

Scroll down to the bottom and click the ESP8266 entry, then click the Install button

6. Once that's finished, go back to Tools-> and select the Adafruit Huzzah ESP8266 board. All the default values should be set, but make sure the Port setting corresponds to how you have connected your Feather (on a Mac it is normally /dev/cu.SLAB_USBtoUART).

7. Now for some test code. Copy this into your Ardunio Sketch editor and then click the Upload button.