Hello everyone,
I've been around embedded programming professionally as well as for hobby. My hobby projects use typically 8-bit microcontrollers (MSP430, ATmega, PIC..). I prefer vanilla C, registers access, and simplicity.
However, I would like to do a little project for home automation. The device shall decode a serial bus from Buderus heating system and report parameters to my home assistant server that uses MQTT. For the transport layer, I could use ZigBee but WiFi seem to be easier. I like the ESP32 device.
I came to the conclusion that writing vanilla C code for the said application would be enormous effort. I would never finish this project. For this reason, I am looking at other options.
- Tasmota in ESP32 + small MCU (that I know well) for decoding the bus. I would then just stream JSONs over UART to ESP32 and let it do its job.
- Micropython in ESP32 - there are some examples online that seem to be easy
- Arduino - I've been always hesitant to use arduino. It is something that professionals avoid. However, I must admit that I blinked an LED with ESP32 in 5 minutes. Still, it feels like a toy.
FYI, “Arduino” in reality refers to three distinct things:
1. Arduino-branded dev boards.
2. The Arduino frameworks (a bunch of C++ libraries, basically).
3. The Arduino IDE.
What’s not necessarily obvious to people is that these things are not indivisible. In fact, you can cherry-pick which you want to use. (Other than trying to use a different software framework from within the Arduino IDE.)
Wanna program an ESP32 using the Arduino framework in the Arduino IDE? Done. ESP32 using Arduino framework in PlatformIO, or any of the numerous other IDEs that support Arduino? Sure! Arduino Uno board with Microchip Studio? Why not! Wanna use the Arduino framework, but write directly to registers? Go for it!
ESP32 is an interesting case, in that its Arduino framework support runs
atop its native ESP-IDF framework, so you can use both at once just by including the right headers.
Since you’re an experienced embedded programmer, I’d suggest using PlatformIO. It has wide support for tons of MCU and board types (the only popular ones that are completely unrepresented are the PICs), tons of different software frameworks, and lives within a nice IDE (Visual Studio Code). Plus it has a robust, grown-up library manager. ESP32 in PlatformIO is an extremely popular combination, whether you use it with or without Arduino. $10 gets you the official hardware debugger, the ESP-PROG board. (Cheap, but a smidgen fiddly to set up.) I’ve built all my recent personal projects with this combination.
I have been meaning to order some STM32 Nucleo boards, since many of them have really nice software support (lots of frameworks) and really good built-in debuggers. But for WiFi, ESP32 is a no-brainer.