ESP32 Thing Hookup Guide
The SparkFun ESP32 Thing is a comprehensive development platform for Espressif's ESP32, their super-charged version of the popular ESP8266. Like the 8266, the ESP32 is a WiFi-compatible microcontroller, but to that it adds support for Bluetooth low-energy (i.e BLE, BT4.0, Bluetooth Smart), and nearly 30 I/O pins. The ESP32's power and versatility will help make it the foundation of IoT and connected projects for many years to come.
The SparkFun ESP32 Thing equips the ESP32 with everything necessary to program, run, and develop on the wonderchip. In addition to the WiFi/BLE SoC, the Thing includes an FTDI FT231x, which converts USB to serial, and allows your computer to program and communicate with the microcontroller. It also features a lithium-polymer (LiPo) battery charger, so your ESP32 project can be truly wireless. Additionally, the board includes a handful of LEDs and buttons to aid in your development.
Covered In This Tutorial
This hookup guide serves as a primer on all things ESP32 Thing. It documents hardware features of the board, including a handful of assembly tips. Then it will delve into firmware development -- including demonstrating how to add ESP32 support to the popular Arduino IDE.
The tutorial is broken up into a handful of sections, which you can navigate through using the menu on the right. Those sections include:
- Hardware Overview -- An examination of the ESP32 Thing's hardware layout and features, including an introduction to the ESP32's I/O capabilities.
- Assembly Tips -- Quick soldering tips and tricks.
- Installing via Arduino IDE Boards Manager -- How to add ESP32 support using the Arduino Boards Manager.
- Installing the ESP32 Arduino Core -- How to add ESP32 support to your computer's Arduino development environment.
- Arduino Example: Blink -- Verify that your ESP32 Thing and Arduino board definitions work with the classic blink sketch.
- Arduino Example: WiFi -- Connect your ESP32 to a local WiFi network, and start IoT'ing.
- Arduino Example: ESP32 BLE -- Connect your ESP32 to a local WiFi network, and start IoT'ing.
- Using the Arduino Add-on -- Tips to help you get started creating Arduino sketches of your own.
The Arduino board definitions for the ESP32 are still a work in progress. There are a handful of peripherals and features that have yet to be implemented, including:
* Analog Input (`analogRead([pin])`)
* Analog Ouptut (`analogWrite([pin], [value])`)
* WiFi Server and WiFI UDP
* Real-Time Clock
* Touch-controller interface
These peripherals are available (if, also, still in their infancy) in the IoT Development Framework for the ESP32. If your application requires analog input, RTC, or any of the features above, consider giving the ESP-IDF a try!
Bill of Materials
The ESP32 Thing includes almost everything you'll need to begin using and programming the WiFi/BT SoC. In fact, the only required extra is a Micro-B USB Cable. The ESP32 Thing's USB interface can be used to both power and program the chip. Once you're done programming the chip, a 5V Micro-B USB Wall Adapter can be used to power the board.
As an alternative power source, the ESP32 Thing includes support for single-cell lithium-polymer (LiPo) batteries, which plug into the board's white 2-pin JST connector. LiPo's are perfect for projects on-the-go, or those that just need a little extra umph. The board includes a LiPo charger -- the rechargeable batteries can be juiced back up by plugging the Thing into a 5V USB source.
Finally, to connect the ESP32's 28 I/O pins to external components, you'll need to do some soldering. Soldering tools, including an iron and solder, are a must for any electronics workbench. And either headers or wire are our recommended mate for soldering into the Thing's pins.
It may look intimidating, but the ESP32 Thing -- especially when you take advantage of its Arduino compatibility -- is a perfect IoT foundation for electronics users of all experience levels. There are, however, a few concepts you should be familiar with before venturing further into this tutorial. If any of the concepts below sound foreign to you, consider reading through that tutorial first: