We ship Feathers fully tested but without headers attached - this gives you the most flexibility on choosing how to use and configure your Feather
Header Options!
Before you go gung-ho on soldering, there's a few options to consider!
|
The first option is soldering in plain male headers, this lets you plug in the Feather into a solderless breadboard |
|
Another option is to go with socket female headers. This won't let you plug the Feather into a breadboard but it will let you attach featherwings very easily |
|
We also have 'slim' versions of the female headers, that are a little shorter and give a more compact shape |
|
Finally, there's the "Stacking Header" option. This one is sort of the best-of-both-worlds. You get the ability to plug into a solderless breadboard and plug a featherwing on top. But its a little bulky |
Soldering in Plain Headers
|
Prepare the header strip:
Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - long pins down
|
|
Add the breakout board:
Place the breakout board over the pins so that the short pins poke through the breakout pads
And Solder!
Be sure to solder all pins for reliable electrical contact.
(For tips on soldering, be sure to check out our Guide to Excellent Soldering).
|
|
Solder the other strip as well. |
|
You're done! Check your solder joints visually and continue onto the next steps |
Soldering on Female Header
|
Tape In Place
For sockets you'll want to tape them in place so when you flip over the board they don't fall out
|
|
Flip & Tack Solder
After flipping over, solder one or two points on each strip, to 'tack' the header in place
|
|
And Solder!
Be sure to solder all pins for reliable electrical contact.
(For tips on soldering, be sure to check out our Guide to Excellent Soldering).
|
|
You're done! Check your solder joints visually and continue onto the next steps |
While the Feather HUZZAH ESP8266 comes pre-programmed with NodeMCU's Lua interpretter, you don't have to use it! Instead, you can use the Arduino IDE which may be more familar. This will write directly to the firmware, erasing the NodeMCU firmware, so if you want to go back to Lua, use the flasher to re-install it
Don't forget to visit esp8266.com for the latest and greatest in ESP8266 news, software and gossip!
In order to upload code to the ESP8266 and use the serial console, connect any data-capable micro USB cable to the Feather HUZZAH and the other side to your computer's USB port.
Don't forget you will also need to install the SiLabs CP2104 Driver:
If you are using Mac OS 10.12.6 (Sierra) and you cannot upload with the latest Mac OS VCP driver, please try the legacy v4 driver below. Note you will need to uninstall the v5 driver using uninstall.sh (in the driver package)
Install the Arduino IDE 1.6.8 or greater
Download Arduino IDE from Arduino.cc (1.6.8 or greater) from Arduino.cc
The latest is usually the best
Install the ESP8266 Board Package
Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json
into Additional Board Manager URLs field in the Arduino v1.6.4+ preferences.
Next, use the Board manager to install the ESP8266 package.
After the install process, you should see that esp8266 package is marked INSTALLED. Close the Boards Manager window once the install process has completed.
Setup ESP8266 Support
When you've restarted, select Adafruit HUZZAH ESP8266 from the Tools->Board dropdown
80 MHz as the CPU frequency
You can keep the Flash Sizeat "4M (3M SPIFFS)
For Upload Speed, select 115200 baud (You can also try faster baud rates, we were able to upload at a blistering 921600 baud but sometimes it fails & you have to retry)
The matching COM port for your FTDI or USB-Serial cable
Blink Test
We'll begin with the simple blink test
Enter this into the sketch window (and save since you'll have to)
void setup() {
pinMode(0, OUTPUT);
}
void loop() {
digitalWrite(0, HIGH);
delay(500);
digitalWrite(0, LOW);
delay(500);
}
void setup() {
pinMode(0, OUTPUT);
}
void loop() {
digitalWrite(0, HIGH);
delay(500);
digitalWrite(0, LOW);
delay(500);
}
Now you can simply upload! The Feather HUZZAH has built in auto-reset that puts it into bootloading mode automagically
The sketch will start immediately - you'll see the LED blinking. Hooray!
Connecting via WiFi
OK once you've got the LED blinking, lets go straight to the fun part, connecting to a webserver. Create a new sketch with this code:
/*
* Simple HTTP get webclient test
*/
#include <ESP8266WiFi.h>
const char* ssid = "yourssid";
const char* password = "yourpassword";
const char* host = "wifitest.adafruit.com";
void setup() {
Serial.begin(115200);
delay(100);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
int value = 0;
void loop() {
delay(5000);
++value;
Serial.print("connecting to ");
Serial.println(host);
// Use WiFiClient class to create TCP connections
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
// We now create a URI for the request
String url = "/testwifi/index.html";
Serial.print("Requesting URL: ");
Serial.println(url);
// This will send the request to the server
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
delay(500);
// Read all the lines of the reply from server and print them to Serial
while(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}
Serial.println();
Serial.println("closing connection");
}
/*
* Simple HTTP get webclient test
*/
#include <ESP8266WiFi.h>
const char* ssid = "yourssid";
const char* password = "yourpassword";
const char* host = "wifitest.adafruit.com";
void setup() {
Serial.begin(115200);
delay(100);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
int value = 0;
void loop() {
delay(5000);
++value;
Serial.print("connecting to ");
Serial.println(host);
// Use WiFiClient class to create TCP connections
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
// We now create a URI for the request
String url = "/testwifi/index.html";
Serial.print("Requesting URL: ");
Serial.println(url);
// This will send the request to the server
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
delay(500);
// Read all the lines of the reply from server and print them to Serial
while(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}
Serial.println();
Serial.println("closing connection");
}
Dont forget to update
const char* ssid = "yourssid";
const char* password = "yourpassword";
to your access point and password, then upload the same way: get into bootload mode, then upload code via IDE
Open up the IDE serial console at 115200 baud to see the connection and webpage printout!
That's it, pretty easy!
This page was just to get you started and test out your module. For more information, check out the ESP8266 port github repository for much more up-to-date documentation!