In this post we’ll walk through why we think the ESP32 is an excellent choice, not just for hobby projects but can scale to in-production devices. Finally, we’ll point to ways to get started with the ESP32 for some of the most common use cases developers face.
A quick introduction to the ESP32
ESP32 is a chip that provides processing power for embedded devices. There are numerous consumer devices in the market that are based on the ESP32 chip. The key benefits of this piece of hardware are:
Price: ESP32 starts at under $10/unit and can be as low as $4/unit at scale
Processing power: the ESP32 is surprisingly capable (80-240 Mhz) and,
Connected: the ESP32 boasts onboard WiFi and Bluetooth connectivity.
Ultra-low-power: low-power usage, multiple power modes, and dynamic power scaling
(Read More in the ESP32 Datasheet).
Other benefits of the ESP32 that appeal to us as developers are that it’s got dual-core processing, you can control the amount of battery power needed to run your device, and that it has around 30 GPIO pins, depending on the model.
Strong developer ecosystem
The flexibility plus the cost means that it’s an excellent choice for firmware developers working on embedded devices, so the ecosystem around the ESP32 is vibrant. You have a number of options for tooling, libraries, and integrations.
There are abstractions available that come in various libraries, such as the Arduino framework which is fully-supported for use with ESP32-based devices. Espressif, the company who created the ESP32 chip, makes a series of ESP-IDF frameworks as well.
We’ve come to love ESP32, especially compared to many of the alternatives for software and hardware developers. While Arduino, Raspberry Pi, and cloud-based services all have their merits, ESP32 is a superior choice for the following scenarios:
- Privacy and security-conscious, specifically if you want to run a device in a private network
- You are looking to grow past the prototyping phase, ESP32 can scale with you
- You’re working on a device that runs on battery power
- Programming and managing a fleet of devices requires over-the-air updates versus flashing hardware
While the ESP32 is incredibly customizable and powerful, it’s also relatively easy to get started, and even easier to maintain.
The ESP32 first-run experience
The most common way of getting started with ESP32 development is using a "DevKit" which includes the hardware itself. There are a variety of different boards available with different features and form factors, and some models even include a built-in screen. But we recommend the DevKit V3 with GPIO headers.
If you are coming from a software development background, writing firmware might be a bit different from what you are used to. Firmware code is lower-level and it doesn’t run on an operating system – it’s more like your code is the operating system.
So your job as an ESP32 developer is to connect the chip to the peripherals required for your use case and program the firmware to run on the chip. In a typical project, you’ll attach an ESP32 chip to peripheral devices like sensors, relays, screens, and switches. Each of those peripherals will be connected to one or more GPIO pins, the i2c/1wire bus, or some other interface.
Within your firmware code, write low-level instructions that the chip will perform, then compile that code and flash it onto the device. This flashing process is where you provide the chip with its operating instructions in the form of machine code. There’s no operating system that loads your code other than what is built into the chip itself.
Programming ESP32 with Raise.dev
We’re currently working on developer tooling to make programming hardware more like software. While we’re currently in Private Beta, sign up below to be granted access in the future.
These are few of a few of the reasons why we love ESP32. Tell us what you think of ESP32 on Twitter @raisedevs.