Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cool stuff, check out the ESP32 if you want to get smaller.


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!


> 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)

Please check out platformio. It made a whole world of difference to me.


Worth to mention that platformio is VSCode plugin.


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)

Documentation for getting it up and running can be found here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/...


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.


There is a single core variant of the ESP32. Maybe that's the only variant AWS supports.

Adafruit sells one of these: https://www.adafruit.com/product/4653


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.

https://os.mbed.com/studio/


For ESP32 and ESP8266 there are a few good non-Arduino options I'm aware of:

* Official Espressif SDKs (C): https://github.com/espressif

* NodeMCU (Lua): https://nodemcu.readthedocs.io/en/release/

* MicroPython: http://docs.micropython.org/en/latest/esp32/quickref.html

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)


You can try this for vim: https://github.com/stevearc/vim-arduino

Back in the day (about four years ago) I used a similar setup with with Sublime Text and an Arduino plugin.

For a more official alternative there's also the new (electron based) Arduino Pro IDE: https://www.arduino.cc/pro/arduino-pro-ide


Oh, cool! Now I know what I’m playing with tonight. :D


> 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.


I run MicroPython on a half dozen of my ESPs.

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.


ESP32 is arduino compatible but you don't have to use arduino. You could just use Espressif's own toolchain, which is all command line.

Or you could try other boards such as STM32.


Esp32 has its own framework/runtime but you can flash it using arduino framework. Have you checked out the platformio cli?


The 'arduino' IDE is for beginners, the standard IDE is now Atmel Studio.


I didn't know Atmel Studio. But it seems to be windows only.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: