The ESP32 is a family of low-cost microcontrollers, made by Espressif Systems, with Wi-Fi and Bluetooth built into the chip. A board costs a few dollars and runs on USB power. It can read a sensor and send the reading to a server, a dashboard, or Home Assistant over your own network, with no gateway, no subscription, and no proprietary radio. Cheap, wireless, and open: that is why it sits under many do-it-yourself agricultural sensors, and under nearly every sketch in this library.
What it is.
A microcontroller is a whole little computer on a single chip: a processor, a bit of memory, and a set of pins it can read and switch. Unlike a Raspberry Pi it runs no operating system. It runs one program, forever, the moment it powers on. That makes it cheap, rugged, and frugal with power, which is what you want bolted to a bench in a greenhouse, waking every few minutes to take a reading.
What sets the ESP32 apart from the microcontrollers that came before it is that the radio is on the chip. Wi-Fi and Bluetooth are not add-on boards; they are built in. So a part that costs about as much as a sandwich can stand on its own, join your Wi-Fi, and send a number somewhere useful. It is the Collect layer made as small and as cheap as it honestly gets.
Why a grower cares.
A sensor on its own is usually not smart. Many of the cheap ones do nothing more than change a voltage or a resistance as the world around them changes: warmer, wetter, brighter. Something has to read that small electrical change and turn it into a number you can use. That job is the microcontroller’s, and the ESP32 does it for a few dollars while also carrying the number out over Wi-Fi. (Some sensors do include their own little chip and hand over a finished digital reading. The ESP32 talks to those just as happily.)
The point, in this work, is not the chip. It is what the chip lets you own. Because the part is commodity and the tools are open, the reading it produces is yours from the first second. It goes to the endpoint you name and lives in the place you keep, and it keeps working if any one vendor walks away. That is the own-your-data rule expressed in hardware. A grower with a ten-dollar board and an afternoon has a sensor network that no one can switch off or rent back to them.
On its own, or part of a system.
An ESP32 build works two ways, and the same board does both. On its own, it is self-contained: it reads its sensor, then sends each reading straight to an endpoint you choose, such as a webhook, a small script, or a database you run. Nothing else has to exist for it to do its job, and that is often all a single bench or tunnel needs.
As part of a system, it becomes one node among many, reporting into something larger that collects every reading, draws the graphs, and runs the automations. The system we embrace here is Home Assistant paired with ESPHome: you describe the board in a short config file, and it appears in Home Assistant with history, dashboards, and rules, and every reading stays yours to keep and export. It is one good option, not the only one. The same board will report to an MQTT broker, a Node-RED flow, or a cloud you run, because it sends wherever you point it. Start standalone and grow into a system later without changing the hardware.
The family at a glance.
“ESP32” names a family, not a single part. The 2016 original, now called the classic ESP32, was joined by a run of newer variants, each tuned for a different job. Two splits matter most. The first is the processor: the original and the S-series use Espressif’s Xtensa cores, while the newer C-, H- and P-series moved to the open RISC-V architecture. The second is the radios: each variant carries a different mix of Wi-Fi, Bluetooth, and the low-power 802.15.4 radio that speaks Thread and Zigbee (the basis of Matter). Get those two right and the rest is detail.
A quick read on the six you will actually meet:
- ESP32 (classic). The workhorse, with the most code examples and the only Bluetooth Classic in the family (for audio). Dirt cheap. Its one quirk: no USB on the chip, so the board carries a separate USB-to-serial bridge.
- ESP32-S2. Single-core with native USB, but no Bluetooth. A specialist for USB-peripheral projects, and the wrong pick for anything that needs BLE.
- ESP32-S3. The powerhouse: dual-core, Wi-Fi and BLE 5, native USB, extra memory, plus vector instructions for on-device AI. This is the one to grow into for cameras, displays, and machine learning.
- ESP32-C3. The value pick. A single RISC-V core, Wi-Fi and BLE 5, and native USB, at the lowest price in the family. The right default for an everyday sensor node, and the Open Agriculture Technology recommendation.
- ESP32-C6. The future-proof choice: Wi-Fi 6, BLE 5, and the 802.15.4 radio for Thread, Zigbee, and Matter, with a low-power second core. Pick it if you are building toward a smart-home mesh.
- ESP32-H2. The mesh specialist: BLE and Thread/Zigbee, but no Wi-Fi. For low-power battery devices on a Matter or Zigbee network, not for pushing to a cloud on its own.
Three more sit on the edges: the bargain ESP32-C2 (ESP8684), the dual-band Wi-Fi 6 ESP32-C5, and the high-horsepower ESP32-P4 application processor, which carries no radio at all and pairs with one of the others. Most growers never need them.
Compare the variants.
Here are the differences that change a buying decision, side by side. The tinted column is the Open Agriculture Technology value default. The last row ties back to the listener sketch, which needs both Wi-Fi and Bluetooth, so two variants are out.
| Spec | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3Open Agriculture Technology pick | ESP32-C6 | ESP32-H2 |
|---|---|---|---|---|---|---|
| Released | 2016 | 2020 | 2021 | 2021 | 2023 | 2023 |
| CPU | Xtensa LX6 | Xtensa LX7 | Xtensa LX7 | RISC-V | RISC-V | RISC-V |
| Cores × clock | 2 × 240 | 1 × 240 | 2 × 240 | 1 × 160 | 1 × 160 | 1 × 96 |
| SRAM (KB) | 520 | 320 | 512 | 400 | 512 | 320 |
| Wi-Fi | Wi-Fi 4 | Wi-Fi 4 | Wi-Fi 4 | Wi-Fi 4 | Wi-Fi 6 | None |
| Bluetooth | Classic + BLE 4.2 | None | BLE 5 | BLE 5 | BLE 5 | BLE 5 |
| Thread / Zigbee | No | No | No | No | Yes | Yes |
| Native USB | No | OTG | OTG | Serial / JTAG | Serial / JTAG | Serial / JTAG |
| Usable GPIO | ≈34 | ≈43 | ≈45 | ≈22 | ≈30 | ≈19 |
| Best for | Ubiquity, BT audio | USB peripherals | Camera, display, AI | Value sensor nodes | Matter, Wi-Fi 6 | Low-power mesh |
| Runs the Open Agriculture Technology BLE Listener | Yes | No (no BT) | Yes | Yes | Yes | No (no Wi-Fi) |
GPIO counts are usable pins on a typical dev board and vary by package; clocks are in MHz. “Wi-Fi 4” is 802.11 b/g/n on 2.4 GHz; “Wi-Fi 6” adds 802.11ax. The classic ESP32 is the only variant with Bluetooth Classic; the rest are BLE-only.
What’s inside.
For all the variation, every ESP32 is the same handful of blocks on one die: one or two processor cores, a little fast memory, the radio and its antenna, a flash chip holding your program, and the pins and peripherals that touch the real world. A low-power coprocessor can keep watch while the main cores sleep.
Anatomy of a dev board.
You almost never buy the bare chip. You buy a development board: the chip’s module soldered onto a small circuit board that adds a USB socket, a voltage regulator, two buttons, and rows of header pins you can plug jumper wires into. That is the thing in your hand. Here is what you are looking at.
The two buttons matter the first time. BOOT (sometimes IO0) and RESET (EN) put the board into flashing mode. On most modern boards the tools handle that for you. On a stubborn classic ESP32 you hold BOOT, tap RESET, and release. Worth knowing before you decide a board is dead.
Where it fits, and where it doesn’t.
The honest line. The ESP32 is the right answer more often than not in this work. It is a microcontroller, not a computer, so a couple of jobs belong to something else.
Where it fits
- Battery or USB sensor nodes that wake, read, push, and sleep.
- Anything that needs Wi-Fi or Bluetooth without an added radio.
- Switching a relay, valve, pump, or light from a reading or a rule.
- Reporting to Home Assistant over Wi-Fi (ESPHome was made for this).
- Learning on the same hardware that runs in real products.
Where it doesn’t
- Running a database, a website, or Home Assistant itself. Use a Raspberry Pi.
- Heavy vision or video. The S3 helps, but a Linux board is usually the answer.
- Long range with no Wi-Fi. Reach for a LoRa link instead.
- Audit-grade measurement. The board is fine; the cheap sensor on it usually is not.
- 5 V logic. ESP32 pins are 3.3 V and not 5 V tolerant, so level-shift first.
How you program it.
There is a path for every comfort level, and all of them are free. You can start at the top and never go lower, or drop down a rung whenever you want more control.
- No code: flash a finished sketch. The Software Library flashes ready-made firmware straight from your browser. One button, and you never see the code unless you want to.
- ESPHome: config, not code. Describe your sensors in a short YAML file, and ESPHome builds the firmware and bridges it cleanly into Home Assistant. The sweet spot for most grower automations.
- Arduino IDE: the gentle on-ramp to
code. Add the arduino-esp32
core and you can open, edit, and flash a
.inosketch. This is what most of our sketches are written in. - PlatformIO: the project workbench. Builds for every variant from one project, with libraries and versions pinned. This is how we ship the firmware.
- ESP-IDF: the full control. Espressif’s own framework. Everything the chip can do, nothing hidden. The deep end.
- MicroPython: Python on the chip. If you already think in Python, you can write straight to the board.
A first ESPHome config is about this short. This one reads a temperature and humidity sensor and publishes it to Home Assistant:
See a minimal ESPHome config
esphome:
name: greenhouse-node
esp32:
board: esp32-c3-devkitm-1 # match your board
wifi:
ssid: "BarnWiFi"
password: !secret wifi_password
sensor:
- platform: dht
pin: GPIO4
temperature:
name: "Greenhouse Temperature"
humidity:
name: "Greenhouse Humidity"
update_interval: 60s
Choosing one.
Skip the analysis paralysis. For almost everyone the answer is short:
Two rules cover the rest. Prefer a board with a USB-C socket and native USB (the C- and S-series) so flashing needs no driver. And buy from a seller who names the exact variant. “ESP32” alone on a listing is not enough to know what you are getting.
Buying and gotchas.
The board is cheap and forgiving, but a handful of things trip up nearly everyone the first time. Worth a read before you blame the hardware.
- 3.3 V, not 5 V. The ESP32’s logic is 3.3 V and the pins are not 5 V tolerant. Feeding a 5 V signal into a GPIO can kill it, so level-shift older 5 V sensors.
- The ADC is noisy. The built-in analog-to-digital converter is non-linear at the rails and jumpy. On the classic ESP32 the second ADC cannot be used while Wi-Fi is on. Average your readings, or use a sensor with a digital (I²C) output.
- Use a data USB cable. Charge-only cables are the most common “it won’t connect” culprit. If the board does not appear, swap the cable first.
- Classic boards may need a driver. The USB-to-serial chip on a classic ESP32 (CP2102 or CH340) sometimes needs a one-time driver. Native-USB variants (C3, S3, C6) do not.
- 2.4 GHz Wi-Fi only. No ESP32 joins a 5 GHz network (the C5 is the lone exception), so make sure your router exposes a 2.4 GHz band.
- Watch the antenna version. Most boards have a PCB trace antenna. Some come with a tiny external-antenna connector (U.FL or IPEX) and need one attached, or range collapses.
- Counterfeits and mislabels exist. A board sold as one variant is occasionally another. Buy from a reputable seller, and confirm the chip the tools report after flashing.
Official resources.
Straight to the source. These open in a new tab:
Espressif: all ESP32 chips and datasheets ESP-IDF documentation Arduino core (arduino-esp32) ESPHome (for Home Assistant) esptool (the flashing tool)
Frequently asked questions.
What is an ESP32 in simple terms?
It is a tiny, inexpensive computer-on-a-chip with Wi-Fi and Bluetooth built in. For a few dollars it can read a sensor and send the reading over your network, which is why it sits under many do-it-yourself agricultural sensors.
Which ESP32 should a beginner buy?
An ESP32-C3 board with a USB-C socket. It is the cheapest variant, has both Wi-Fi and Bluetooth, and flashes with no driver to install. Step up to the ESP32-S3 only if you want room for a camera, a display, or on-device AI.
What is the difference between the ESP32, S3, C3, and C6?
The classic ESP32 is the original dual-core workhorse with the most code examples. The S3 is the dual-core powerhouse with native USB and AI instructions. The C3 is the low-cost single-core value pick. The C6 adds Wi-Fi 6 and the 802.15.4 radio for Thread, Zigbee, and Matter. The S2 has no Bluetooth and the H2 has no Wi-Fi, so both are specialists.
Can the ESP32 work with Home Assistant?
Yes, and it is one of the smoothest paths available. Using ESPHome you describe the board in a short configuration file, and it appears in Home Assistant with history, dashboards, and automations. The readings stay on your own network, yours to keep and export. The same board can also report to an MQTT broker or any other server you run.
Does the ESP32 need the internet to work?
No. It joins your local Wi-Fi and can push readings to a server or to Home Assistant on your own network with no internet at all. You decide where the data goes, and nothing is forced to a vendor cloud.
What voltage does the ESP32 run on?
The chip’s logic is 3.3 V and its pins are not 5 V tolerant, so a 5 V signal into a GPIO can damage it. Boards are usually powered from 5 V USB and regulate it down to 3.3 V on board. Level-shift any older 5 V sensors.
Can you use an ESP32 without knowing how to code?
Yes. Ready-made firmware can be flashed onto an ESP32 from a web browser with one button, and ESPHome lets you describe attached sensors in a short configuration file with no programming at all. Writing your own code is an option, not a requirement, and many working sensor builds never involve any.
Can an ESP32 connect to 5 GHz Wi-Fi?
No. Every mainstream ESP32 uses 2.4 GHz Wi-Fi only (the newer ESP32-C5 is the single dual-band exception). Make sure your router has a 2.4 GHz network the board can join.
Is the ESP32 open source?
The chip itself is a proprietary commercial product, but Espressif's development tools and software frameworks are free and open source, the documentation is public, and boards are sold as commodity parts by many vendors. That openness means no single supplier can lock you in, and it is why the community around the ESP32 is so large.