Chapter 2. First Projects with the ESP8266

Now that your ESP8266 chip is ready to be used and you can connect it to your Wi-Fi network, we can build some basic projects with it. This will help you understand the basics of the ESP8266.

We are going to see three projects in this chapter: how to control an LED, how to read data from a GPIO pin, and how to grab the contents from a web page. We will also see how to read data from a digital sensor.

Controlling an LED

First, we are going to see how to control a simple LED. The GPIO pins of the ESP8266 can be configured to realize many functions: inputs, outputs, PWM outputs, and also SPI or I2C communications. This first project will teach you how to use the GPIO pins of the chip as outputs:

  1. The first step ...

Get Internet of Things with ESP8266 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.