The ESP8266 can be programmed using the Arduino IDE. The best part is the codes are similar to Arduino. To start programming a ESP8266 using Arduino IDE follow the below steps
Prerequisites
- Arduino 1.6.8, get it from Arduino website.
Steps
- Start Arduino and goto File-> Preferences.
- In the “Additional Boards Manager URLs” Enter
http://arduino.esp8266.com/stable/package_esp8266com_index.json
(You can add multiple URLs, separating them with commas) - Click “OK”
- Open Boards Manager from Tools -> Board menu and find esp8266 platform.
- Select the version you need from drop-down box.
- Click install button.
- ——————————————–
- Upload a blank sketch to the Arduino.
- Connect RX to RX and TX to TX
- GPIO_0 will go to GND
- VCC and CH_PD will go to the 3.3v supply line
- Select the appropriate ESP8266 board from Tools > Board menu.
- Select the appropriate Flash mode (DOUT or QIO. See notes below)
- Other parameters works mostly as it is – but still check once.
- Start upload
- RESET the module. This is a critical step and the timing matters. It may need a few tries to get it perfect.
After the code uploaded
- Disconnect GPIO_0
- Reset
For further details please check http://esp8266.github.io/Arduino/versions/2.3.0/
Please see this article for a basic code (Blinking LED that is the Hello World of micro-controllers)
Notes
- While uploading codes through Arduino IDE select DOUT for new chip and either DOUT or QIO for old chips.
- Keeping it to DOUT will work for both New and Old chips.
- Burning new chips with QIO (or inappropriate modes) will result in a successful burning but the code will not run.
Here is a Troubleshooting Guide and parameters that worked for me.
Flashing guide for new chips.
3 thoughts on “ESP8266 Programming Using Arduino IDE”