ESP32 is one of the Arduino-compatible boards, right?
I keep bouncing off Arduino stuff just because I find their IDE to be astonishingly awful (at least on Linux, running inside a dwm window manager)
I’d be 100% on board if I could write the code in vim and ideally compile/upload from the command line. Maybe a nice makefile. And I did set that up for a few arduino devices in the past, but it was just too much jumping through hoops for me to really bother with longterm. Much easier to just grab a RPi Zero and install a compiler or python on it and then just code directly on the device, over ssh.
If there’s a better approach to handle the coding side of things than the standard Arduino IDE, I’d be super interested to learn about it!
Think you are doing platformio a disservice here. It has a VSCode plugin available but there is also a standalone set of commandline tools that are editor/IDE agnostic.
The main thing is, but it just shells out to its CLI (named PlatformIO Core). Nothing is stopping you from using with another IDE, and they even have automated tools to set them up for you: https://docs.platformio.org/en/latest/integration/ide/index....
They have their own first party OS/SDK - ESP-IDF, which imho is far nicer to work with directly than Arduino or PlatformIO (PlatformIO supports ESP-IDF, but not always the latest version)
FWIW I had an extremely bad experience using the ESP-IDF with my team. We wasted a lot of time trying to get everything to properly build and link due to the convoluted way Espressif has set up the CMake dependencies. Lots of hard coded paths and one little thing could cause a lot of issues with compilation.
I even submitted a PR to fix one of the areas that caused me a lot of headache (it had to do with an assumption about the Python environment), and it was rejected because the ESP-IDF is meant to be opinionated about its choices.
What's even worse is Amazon's ESP32 FreeRTOS distribution. Stay away from that with a 10ft pole. Sure, it sounds nice to have some integration with AWS (GreenGrass, IoT Core, OTA via MQTT via AWS, etc), but half the ESP32 won't work (eg multicore) and modules that you find for ESP-IDF are not inherently cross compatible.
Yeah it's not just you - Arduino's IDE is astonishingly awful. But ESP32 isn't really anything to do with Arduino, other than the fact that Arduino supports some boards that use it. You can program the ESP32 in whatever IDE you like.
By the way if you are looking for something like Arduino but less awful, Mbed is the most promising option. Their boards and API have been far superior for years, but unfortunately they relied on a mediocre online IDE. However they have finally seen the error of their ways and have a proper offline IDE, based on Theia, which is based on VSCode.
I haven't used the official SDK in several years and frankly the current state of their Github org confuses me (why are there so many options now?), so I won't say much about that. They do have a large library of examples however.
NodeMCU is a Lua firmware that abstracts away much of the ugliness you'll encounter trying to learn the C SDK. After the initial Lua learning curve and figuring out what it means to build and flash firmware, it's quite pleasant to use. I find the development iteration cycle much quicker than with the C SDK.
MicroPython is of course a Python firmware along those same lines. I personally haven't had much success with this one, and NodeMCU worked well enough that I didn't try much harder.
I too would like to see a nice straightforward solution to BYO editor to the Arduino IDE, everything I've looked at has been a set of strange hacks. (EDIT: I now see the link to vim-arduino, thanks mollusk)
> ESP32 is one of the Arduino-compatible boards, right?
Yes. The ESP8266 is too. I drive several of both chips through Arduino or ESPHome. I’m no programmer but have been very pleased by what I could achieve through the Arduino IDE (on a Mac).
> I keep bouncing off Arduino stuff just because I find their IDE to be astonishingly awful
Arduino is both a cpp framework AND a really bad IDE. Using tools like PlatformIO or just your favorite toolchain, you can still use the Arduino libraries and skip their IDE.
With the ESP8622/ESP32 you can also skip arduino and use MicroPython, or push c/cpp code.
Being able to drop into REPL and rewrite it is a super power. And while MicroPython doesn't tend to come with every library that Python does, you can generally install them via pip.
How fast is it? I'm curious because I've been debating trying it out for some relatively simple stuff with GPIO pins and MQTT (largely just reading some sensors, enabling/disabling some other pins based on those sensors, and submitting telemetry via MQTT). MicroPython seems a lot faster to get up and running with, but I'm concerned that on such a small device that it'll be prohibitive (but I'm also coming from a server background, so I may be overestimating how much slower these are).
It isn't slow. If all you're doing is reading, then the overhead will be pretty much the same as if you were using the Espressif SDK, because you'll find the bottleneck is I/O, not the extras that MicroPython provides.
A cold boot is slower, and takes a couple seconds, but after that most of the latency is comparable to if you were doing it with the SDK.
MicroPython is heavily optimised, and doesn't supply a lot of the mutable madness that makes CPython so slow. (For example, a for loop in CPython is slower than a list expression. In MicroPython, they're the same speed.)
You can do Arduino dev in Eclipse (insert some sort of joke here), and I've always found Eclipse to be surprisingly good at C/C++ dev and it worked for me there.