Categories
ESP8266

What Is ESP8266? How is it useful for IoT Prototypes?

ESP8266

ESP8266 is a Wifi-enabled microcontroller made by Espressif Systems in Shanghai, China. With the help of the online development community & hundreds of examples online. ESP8266 is a powerful device that lets you build IoT prototypes & projects in no-time. You can pretty much control & connect anything electronic from the web or from a local server. Or you can even connect to your ESP8266 from other devices via Wi-Fi.

ESP8266 can enter 2 different Wifi modes:
  • ‘Station’ (STA – connecting ESP to a Wifi Network)
  • ‘AccessPoint’ (AP- creates it’s own network & allows other devices to connect to it.)

One of the best parts of the ESP8266?

An ESP8266 Development board costs < $5 USD!

ESP8266 Development Boards

There are different development boards that are made for ESP8266

Integrate Input/output SENSORS & Modules

Integrate this microcontroller development board to any low-voltage electronic sensor or module that you can imagine.

  • OLED/LED Touch Screens
  • Pushbuttons
  • Cameras
  • RFID Readers/Writers
  • Microphones
  • Motors
  • + many others.
How can we integrate electronic components into our microcontroller?

This is done by connecting the modules to the development board & mapping them to the pinout.

What is Pinout of a Microcontroller?

A pinout is the layout of a development board. It’s the layout of a board’s components, processor, pins and defines their various functions. It lets developers identify where to connect which pin in code. The Pinout is also referred to when integrating with special hardware protocols and/or connections.

For example, if you want to send a rotation sensor’s analog signal (the output of a potentiometer) to a microcontroller. You have to make sure you’re using a pin that has an ADC (Analog to Digital Converter) pinout. For more details on this particular example check out my post Rotation Sensor Controlling an LED on ESP12E NodeMCU in Arduino IDE.

In the pinout below, you can see that the ADC pinout is at pin A0 to the bottom right. This means we would use this pin to communicate with any analog signal.

What are GPIO Pins on the pinout diagram?

GPIO stands for ‘General Purpose Input/Output’. These are pins that can communicate input/output signals from your microcontroller to your input/output devices (LCD’s, LED’s/Pushbuttons/Motors…etc).

There are also different hardware communication protocols that input/output devices follow such as UART, SPI, I2C & others. However, details of these protocols are not needed for starter projects.

How can I write code onto the ESP8266?

Glad you asked! My favorite tool is the Arduino IDE. I’ve only used Arduino IDE because most of the code examples & resources I find online happen to have examples in Arduino rather than Lua.

Why the Arduino IDE?

The Arduino IDE has support for lots of ESP8266 Development Boards. Yes, that includes my favorite one, the ESP8266 NodeMCU.

Loads of Support in Arduino IDE!

There are numerous libraries available and they are easy to install. This is all due to the huge legion of developers contributing to open source projects like this. Because of their support, IoT prototyping is easier for everyone.

Arduino IDE’s Board Manager Screenshot of searching ‘esp8266’


Below is an example Blink code on the Arduino IDE. It will blink the built-in light on the board.

Arduino’s Blink Example – Blinks a light for 1 second on/off on repeat.

How is ESP8266 useful for IoT Prototypes?

In summary:

ESP8266 is very useful for IoT prototyping because of it’s ample library support, numerous online examples, and ridiculously low cost!

Hardware is hard, but ESP8266 makes prototyping for hardware easier since a lot of the hardware concepts are abstracted away. This means we can get started on our prototypes faster.