ESP8266 Thing Development Board Hookup Guide

Pages
Contributors: jimblom
Favorited Favorite 13

Example Sketch: Blink

Example 1: Blink

To verify that everything works, try uploading the old standard: Blink. But instead of blinking pin 13, toggle pin 5, which is attached to the onboard LED.

language:c
#define ESP8266_LED 5

void setup() 
{
  pinMode(ESP8266_LED, OUTPUT);
}

void loop() 
{
  digitalWrite(ESP8266_LED, HIGH); // LED off
  delay(500);
  digitalWrite(ESP8266_LED, LOW); // LED on
  delay(500);
}

Upload Fails – Troubleshooting

If you get the following error ending with something like esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header:

Upload Error 1

Make sure that you select the SparkFun ESP8266 Thing Dev as the board. Selecting just the "SparkFun ESP8266 Thing" without the word "Dev" can cause problems uploading when using the ESP8266 Community Board Add-On.

If every upload attempt results in an error ending with something like error: espcomm_open failed:

Try changing the board to Generic ESP8266 Module, and in the sub menus, make sure the following sub-menu's are also set: