The ESP32 is a beloved microcontroller from Espressif, offering quite a lot in a small, very cheap package. Yet as you may already know, there are lots of different kinds of ESP32, and it can be hard to know where to get started. Once you find your footing, though, you'll start to come up with all kinds of ideas, from building your own sensors to putting together your own LED-powered matrix displays.
For those who want to get started and aren't sure where to start, I'll outline my specific journey that I undertook to get started and figure things out. I'm not at all claiming that this is the "right" way, nor do I think it's the best way, but I hope that the path I've taken can resonate with a reader who wants to get started and isn't sure how. For me, this path has meant that I've been able to slowly get to grips with things at my own pace, and has allowed me to get comfortable without feeling overwhelmed.
For context, I have a background in computer science, and I've always enjoyed developing software, reverse engineering, and messing about with hardware. As a result, I almost certainly had a head start in that the programming concepts that I was exposed to were ones I may have seen in other areas, even if I hadn't seen them in the context of the ESP32.
Despite all of that, I hope that this article can help someone looking to get started who wants to learn but isn't sure how.
Picking an ESP32 and your first sensors
The hardware is just as important as the software
First and foremost, while there are a ton of ESP32 devices out there, there's only one that you need to get started... and that's the original. When I got started, I honestly wasn't sure how interested or invested I would be in the space, so it's good to start simple. While the original is outdated in many ways and will likely be a limitation in the future if you decide to delve further, it's a great place to start.
The ESP32 that I went for is specifically the ESP32-DevKitC, which is easy to find, cheap, and compatible with most things you'll throw at it. It supports Wi-Fi and Bluetooth, with a notable aspect of it being that it's still the only ESP32 that supports classic Bluetooth, complete with support for pairing and even audio streaming.
With that, you can also pick up a breakout board, though it's not necessary at all. A breakout board will split each pin into signal, voltage, and ground connectors, and depending on the board, you'll likely get additional power output options, too. I've basically never needed it, and instead, you would probably be better off grabbing a breadboard instead. Make sure it's big enough to take the ESP32 and any sensors you'd like to hook up to it; otherwise, you'll end up like I did and have to use multiple breadboards just to connect multiple sensors at once.
The next item on your list will need to be a set of jumper wires. For breadboarding, you'll need male-to-male jumper wires, and if you're connecting directly to the ESP32, you'll need female-to-female wires. It can also help to have female-to-male wires for testing, but thankfully, these are cheap. You can get a lot of different wires for just a few dollars, and you can reuse them across projects.
Next up is to think of the types of sensors you'd like. Truth be told, I had no clue what I wanted at the time, and I ended up buying a box of random sensors aimed at Arduino beginners just to try out different uses and see what I could do. My first project was an LCD with a potentiometer that could pull data from Home Assistant, and I can pinpoint my addiction to developing on these little devices to the moment I could see my living room's temperature on that little LCD.
If you already have in mind what you'd like to do, then you don't need to think about it any further. Find the sensors that you want to build and then buy them. If you're at a loss, though, a box of random sensors isn't a bad idea. The biggest curse of any development or technical project is not knowing what you don't know, and getting a truckload of sensors like that will enable you to think in the right way and approach the topic in a way that allows you to try a lot of different things.
The only downside of this approach is that it's significantly more expensive, and many of the sensors in these kits can be of lower quality. It's good for getting started, but many of them may not be usable for future projects that you want to actually deploy in a permanent state in your home.
Picking your software
It all depends on what you know
This will depend entirely on your past experience with single-board computers or microcontrollers, along with programming in general. There are countless starter guides out there for individual pieces of software, but few guides on software you should start with in the first place.
If you use Home Assistant, then the best option by far is ESPHome. It uses YAML syntax to define configuration files for your ESP32 devices while integrating with Home Assistant, and though you will need to use C++ for more advanced logic, it greatly simplifies testing and deployment. To give you an idea, here's the entire configuration you need to add to get the DHT11 temperature sensor working and reporting to Home Assistant, once it's connected to your ESP32.
sensor:
- platform: dht
pin: D2
temperature:
name: "Living Room Temperature"
humidity:
name: "Living Room Humidity"
update_interval: 60s
That's it. ESPHome already knows what the DHT11 is, and so long as you have its signal pin plugged into pin 2 on your ESP32, it will install and boot up, then instantly start reporting data. It's brilliant, easy, and simple to use. Plus, there are many "ready-made" projects you can deploy and try out to get to grips with the ESP32, like a Bluetooth proxy, so it's a great way to get started.
When it comes to ESPHome, the barrier to entry can be deceptively low. As things get more advanced, be prepared to look at the ESPHome Discord, Reddit, and forum a lot more, though, and look for code samples on GitHub. Things ramp up fast, and for more advanced tasks, ESPHome can sometimes complicate things further as you implement more and more C++ code inside lambda blocks.
If you have experience with the Raspberry Pi or Arduino, though, then the Arduino IDE might be more up your alley. Once you've added the ESP32 package to the Arduino IDE, you can immediately start developing in C++ and deploying your own tools, too, though you'll have to find ways to get data to Home Assistant (or wherever you want to send data to) yourself. I recommend using an MQTT broker, as it's easy, lightweight, and understood by everything.
Finally, the third option is PlatformIO, and I use it in VS Code. There's more setup involved, but it works well and means you get all of the advanced features of VS Code too, like extensions, version control, and better file management. What one person needs may differ from what someone else needs, but PlatformIO offers more options in general in the long run.
I still mostly use ESPHome for everything, but for more advanced projects, I've used PlatformIO the most. It's been the best for writing C++ code and deploying my own projects, though there's nothing wrong with starting on the Arduino IDE if it's what you're used to.
It's all about the journey
And mine may not be the right one for you
Once I had my ESP32 and my sensors, I spent days just building random projects, tearing them down, and building something new. In a way, it was like electronic Lego. I just built things, saw how they reacted, then either added to them or built something new, and spent some time doing that. Eventually, I bought the ESP32 Cheap Yellow Display, and I learned how to develop on that using LVGL graphics.
Since then, I've been trying all kinds of projects. I powered a 64x32 matrix display with an ESP32, and I've since picked up an ESP32-C6 to play with Zigbee and an ESP32-S3 with 16MB of flash and 8MB of PSRAM, just to try out some more advanced projects. There are a lot of ways to use these little devices, and once you get comfortable, you can start developing for devices like the Seeed Studio XIAO ePaper Panel and keep them on your desk.
All of this has been fun, exciting, and as someone who loves to learn, a fantastic hobby to pick up and play with. I recently picked up a soldering kit for more "permanent" devices, and I've already used it to connect an old, broken speaker to a ReSpeaker Lite, and it blew me away when it just... worked.
With that said, this hobby is certainly not for everyone. Start small, grasp the basics, and if you don't like it or find it difficult, there's nothing wrong with that. My journey worked for me, but it may not work for you, and that's the joy of hobbies. You can pick it up and put it down in your own time, and whether you want to stick with it is entirely up to you. But if you're struggling to figure out how to start, I know that my journey gave me the perfect sliding scale of difficulty to prevent me from being overwhelmed by the sheer volume of choices.
