Getting started with the ESP8266
What you need
The ESP8266 is a small, inexpensive Wi-Fi chip, the one inside CryptoTicr. It comes on little development boards sold almost everywhere, and it is a friendly way to start making Wi-Fi projects of your own. To begin:
- A development board. A small board with the chip, a USB port for power and programming, and pins for wires: a LOLIN D1 mini or a NodeMCU board (board list). Nothing to solder to get going.
- A USB cable. For power and for loading your programs. Some cables carry power only; use one that carries data too.
- A starter kit, if you like. A breadboard, jumper wires, a few LEDs and buttons, and a sensor or two. Many kits are sold with an ESP8266 board included.
The tools
All free:
- The Arduino IDE, the simplest place to start. Add Espressif’s ESP8266 board package in its Boards Manager; it comes with examples you can open and run.
- PlatformIO, an extension for Visual Studio Code, for bigger projects later on.
First projects, one step at a time
- Blink. Open the Blink example and upload it. The board’s light flashing proves the board, the cable and the tools all work.
- Join your Wi-Fi. Use the Wi-Fi example to connect, and print the board’s address.
- Serve a small web page. The board can serve its own page (the ESP8266WebServer examples). Put a button on it that turns an LED on and off, and open it from your phone.
- Read a sensor. Add a temperature sensor and show the reading on that same page.
- Add a small screen. A small OLED screen on four wires shows the temperature, or the time. On a D1 mini its two data wires go to D1 and D2.
Each step is small on purpose: when something goes wrong, you know where to look.
Where to go next
- Open projects that run on these boards. Tasmota and ESPHome for home automation, WLED for LED strips. You can use them as they are, and read their code to learn how they work.
- The documentation. The Arduino core for ESP8266 documentation covers Wi-Fi, web pages, files and more.
- Patience. A first project can take an afternoon. A finished product, one that anyone can set up and that keeps working in every home, is a much longer road: CryptoTicr took years.
The story of the chip in the ticker: The ESP8266 chip inside the ticker.