ESP8266 Arduino

From ElectroDragon
Jump to: navigation, search

Refer to the default github page.

Supported Board

Supported Board

  • Adafruit HUZZAH ESP8266 (ESP-12)
  • NodeMCU 0.9
  • NodeMCU 1.0
  • Olimex MOD-WIFI-ESP8266-DEV
  • Olimex MOD-WIFI-ESP8266
  • SparkFun ESP8266 Thing
  • SweetPea ESP-210
  • Generic ESP8266 modules

How to install

New version can install from board manager (search esp8266)

  • Arduino IDE 1.6.0 or later
  • Installing
  1. Create a folder named hardware in your Sketchbook folder, usually:
  2. Linux: ~/Sketchbook
  3. OS X: ~/Documents/Arduino
  4. Windows: ~/My Document/Arduino
  5. Download a release
  6. Extract release
  7. Place esp8266com folder in hardware folder created in step 1.
  8. Start or restart the Arduino IDE

Quick Start

  • Choose correct board

Esp8266 arduino selection.png

  • Demo code
void setup() {   // initialization
  pinMode(16, OUTPUT);  // set the io pin 16 to output
void loop() {   // loop
  digitalWrite(16, HIGH);  // GPIO16 high TTL, LED on
  delay(1000);           // delay 1s
  digitalWrite(16, LOW);  // GPIO16 low TTL, LED off
  delay(1000);           // delay 1s
  • enter into bootloader mode of the board first
  • Click to upload the sketch
  • Now the LED on ESP8266 pin16 will start to blink
  • For more supported function please refer to the github page.

Esp8266 upload.png}