ECE 4180 - Fall 2015
Table of Contents
Using the Adafruit Huzzah to Add Wi-Fi to the mbed LPC1768¶
The ESP8266 is a WiFi SoC that can cost as little as $5 mounted on a PCB. The Huzzah ESP8266 breakout costs $9.95 when purchased from Adafruit. It is a FCC approved ESP8266 module and has a metal cover to reduce RF emissions.
Schematic for the Adafruit ESP8266 Breakout Board.
The datasheet for the ESP8266 Wi-Fi chip can be found here.
Wiring for Adafruit ESP8266 Huzzah¶
The Adafruit Huzzah powers up at 9600 baud with the NodeMCU firmware running Lua. The NodeMCU firmware supports DNS and use of the ESP8266 I/O pins. The Huzzah also has a reset and bootloader pushbutton on board.
Example wiring setup.
The Huzzah draws too much current (5V 500MA max) to use mbed's USB based power supply and will need a second 5V DC power supply.
|Huzzah||mbed LPC1768||External 5V DC supply >=500MA|
|TX||RX - p27|
|RX||TX - p28|
Each HUZZAH ESP8266 breakout comes pre-programmed with NodeMCU's Lua interpretter. The Lua interpretter runs on the ESP8266 and is used to communicate commands to the ESP8266 wif chip and read out the results over serial. A Lua command tutorial is available.
You can find a tutorial for using Lua and Huzzah over a serial connection at Adafruit - Using NodeMCU Lua
A Wi Fi access point or hotspot will be needed to use these demos. A PC or Mac can be used to setup a Wi Fi hotspot whe n there is not a Wi Fi access point already setup. Many Windows PCs with just Wi Fi can setup a PC mobile Wi Fi hotspot or hotspot using a Mac or new hotspot setup instructions for Windows 10. This chip can also be a Wi Fi access point, but that feature is not used in the demos here.
ESP8266 NodeMCU Interface¶
There is an mbed ESP8266 class driver in development for the NodeMCU firmware.
Serial Passthrough Program¶
This mbed serial passthrough program can be used with a terminal application window to experiment with typing in commands. Just hook up power, two serial pins to mbed, and start a terminal application program running at 9600 baud connected to mbed's USB virtual com port (don't hookup reset pin to try this).
Serial pass through program - version for mbed LPC1768 pins 28,27 9600 baud
This demo program can be used to send a simple GET request and POST request as a web server via the Huzzah module.
Command line output from demo.
Simple hello world message hosted on a web server via the demo code.