Introduction to ESP8266 development board - Getting started tutorial (original) (raw)

ESP8266 development board and its introduction and how to program it with Arduino IDE. I have already posted many articles and projects on esp8266. In these projects and articles, I ussed ESP8266 wifi module maximum time with other microcontrollersl like interfacing esp8266 with pic microcontroller, how to interface esp8266 with Arduino and many others. But in today’s tutorial, we will see how we can use ESP8266 development board as a stand along board to make embedded systems based projects and applications. It also has built in processor on it. Earlier we were communicating with this processor through AT commands. But Now we will see how we can program esp8266 wifi module through Arduino IDE. Programming this development board with Arduino IDE is as easy as programming Arduino with the help of Arduino IDE.

Types of ESP8266 development boards

There are many ESP8266 development boards available in market. But maximum ESP8266 development board do not have on board FTDI USB-to-Serial chip on it. Having on board FTDI USB-to-Serial chip makes your life easier while programming this module. Otherwise you have to connect FTDI USB-to-Serial module external with esp8266 wifi module which makes your project more costly and increase hassle of dealing with more wires. There are many companis which are developing these wifi based development boards. But in this article, I am going to use a ESP8266 Thing Development Board Hookup Guide by sparkfun. It has a on chip FTDI USD to serial converter which can be used to program the board through Arduino IDE serially. So we do not need any external programmer to program this board. It has pin headers to connect with external components like LED blinking, relay control etc. I will discuss all these examples in later tutorials. Pins are divideded in two parallel rows and they are compatiable with bread board means you can connect this board directly into bread board. ESP8266 development board

Hardware pins discription of ESP8266 development board

Details of all pins on the left hand side of module are give below.

Pin out of esp8266 development board

Details of pins on the right hand side of the module are given below:

Pin out 2 of esp8266 development board

This module has general purpose Input output pins, one analog to digital converter. But if you need more than one ADC, you can use ADC expander IC with this module. It also has features of I2C communication and SPI communication which is very useful for communicating with various sensors and digital displays like GLCD’s and TFT displays. This board has on board LED which is connected with pin number 5 of esp8266

How to program esp8266 development board with Arduino IDE

Now lets see how we can program esp8266 development board using Arduino IDE. Follow these steps:

program ESP8266 development board

http://arduino.esp8266.com/stable/package_esp8266com_index.json

LED blinking code using esp8266

Lets write a simple LED blinking code and check if is it works on our esp8266 development board or not. Paste the following code in Arduino and click on compile. It will successfully compile your code.

#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); }

Video lecture on led blinking with esp8266 development board

In above code, we are using pin number 5 of esp8266 as a output and ESP8266 Thing Development Board has on board LED connected with pin number five. This code will blink the Led after every five hundred mili second.