Hacker News new | ask | show | jobs
by writeslowly 757 days ago
The ESP32 seems like a very different product to me. The pi has megabytes/gigabytes of memory and can reasonably run linux. Were people really using them for the same things?
5 comments

I've personally used Pis for things much better suited to microcontrollers, many many times, purely because I understood Linux and did not understand how to program microcontrollers.

Now, the tooling around ESP32s is so good that that's no longer a reason. I would never reach for a Pi over an ESP32 unless I need something an ESP cannot offer, like USB ports or compute or gigabytes of memory.

> I've personally used Pis for things much better suited to microcontrollers, many many times, purely because I understood Linux and did not understand how to program microcontrollers.

This describes my trajectory over the last 10 years with the Pi perfectly too. I think a lot of people have jammed a small SBC like the Pi into what should be a micro-controller shaped problem hole, because it's comfortable and familiar.

It's just like hacking software at a dev day job, and it runs a Linux distro everyone is super comfortable with. It has GPIO you can learn how to call from any language you like, I already know ssh/systemd/apt etc etc. It will get the job done, albeit often less efficiently and reliably than a microcontroller, and I didn't have to spend a lot of time learning things.

I also think the huge success of ESP32 in the last few years has meant you don't see SBCs being used for what should be micro-controller problems as much in general anymore. Ten years ago, you regularly saw Pi 1/2 etc in this role in a lot of projects online. Speaking for myself, I avoided Arduino in the early years because I didn't want to step out of my lane etc.

Agree with everything you said. To expand on this:

> Speaking for myself, I avoided Arduino in the early years because I didn't want to step out of my lane etc.

Personally the reason I've avoided Arduino is the absolute pain in the butt that it used to be to get it connected to a network. Almost everything I build benefits from some sort of connectivity, and the Arduino was only really good for things that were purely offline. Even before the Pis had wifi, they had ethernet and I could just plug them in.

And now that ESP32 exists there's no reason to buy the wifi-enabled arduinos they now make, at 8x the price.

The esp32 s3 is a beast
I think the Pi is for people who want to run Linux and also be able to direct-drive voltage pins. Cheap intel systems are way better at running linux, and esp32s are way better at driving the voltage pins, but the former doesn’t offer easy hardware-pin accessibility through python and the latter has you figuring out which filesystem library to compile into your binary.
> the latter has you figuring out which filesystem library to compile into your binary

For what many people are doing with them, ESPHome has simplified the process to programming an ESP32 to do what they want down to nearly nothing.

"Running Linux and being able to direct-drive voltage pins" is certainly still an existing market, but it is rapidly being encroached upon in both directions.

Yes! This is the space PI is still best for, in my opinion. The intel SBC achieve GPIO by adding a microcontroller to the board (as far as I know), but with PI you can drive those pins directly.
The ESP32 is meeting the needs of people doing IOT things that they used to do on the Pi.

Why deploy a $25 Pi for a custom weather controller that uses ~2.5w, when a $5 ESP can can do the same thing on 25mW, and run off a battery?

ESP32 is obviously not a desktop or server platform. Personally, I don’t think Pi’s are either: flaky and fussy power requirements, and packages aren’t always cross compiled to arm64. I’ve wasted enough time compiling my own packages, and encountered my share of random issues that I’ll never use it as a server platform again.

Maybe off-topic, but are there good solutions for esp32/other microcontrollers controlling zigbee devices ?

I found a bunch of libraries (e.g., https://github.com/espressif/esp-zigbee-sdk), but nothing that seems easily usable as a zigbee controller/hub to flip switches in the house, out of the box.

OTOH, running home assistant on a pi is monstrous: overly general and bloated for my use case, need a beefy Pi to get decent performance and not need >1 minute to reboot after a power outage.

Zigbee support is a relatively new feature. I believe the C6 and H2 variants of the ESP32 are the only ones to support it.
> Were people really using them for the same things?

Yes, I was talking to someone who was using a Raspberry Pi as a hot tub controller. Something a $1 ESP8266 could easily do.

Amusingly, I recently talked to someone who built a hot tub controller with an ESP32; it runs on a battery that lasts for half a year.
I received an 8 channel ESP32 board today that I’m planning to use to replace the failed ~25 year old control board that failed in my hot tub.
> Were people really using them for the same things?

No, generally not. Sure, there is overlap. The power requirements, processing elements, available peripherals, storage capacity, form factors, tool chains and cost are all in very different classes, however.