Hacker News new | ask | show | jobs
by sschueller 2522 days ago
Very cool but I find a pi is overkill for something like this. ESP8266 or ESP32 would work just as well.
5 comments

They would, but the Pi Zero is a much better UX for people who don't deal with microprocessors on a regular basis. It has SSH, I can get in and look at logs from my desktop, wifi is standard. It all adds up - and for something like this, the power draw is not an issue, and the cost is minimal.
This is the hardware equivalent of bloated webpages HN tends to dislike :P
It is - but the same applies to a lot of webpages - would people create them if they had to lovingly handcraft every html tag on a page? :)
They would probably create them less, but suggesting people to sometimes hand-craft HTML tags for less resource usage and more speed isn't bad, is it?
I still do all/most of my html css js by hand in Notepad++, @davchana at Gitlab. Yes, just a hobby, but still.
I think the relevant distinction that should be made is that a bloated hardware project is only going to be seen and experienced by one person, whereas a bloated website is slow for all.
It costs six bucks and runs something very close to stock Debian, which greatly eases software development.
Yes, and Electron allows people to use JavaScript and CSS which simplifies cross-platform software development.
I hate Electron apps as much as the next person, but it's indisputable that to get a simple desktop app deployed, Electron is easier, and to me that signifies that it serves a purpose, at least in the prototyping space.

I have like 10 ESP32's lying around my house, they're fun to tinker with, but my Raspberry Pis get a lot more attention from me because there is a substantially lower cognitive overhead with them than the ESPs. If I had a plan on selling my stuff, then yeah, the Raspberry Pi might be overkill and I'd consider going for an MCU module. However, for a fun little DIY project, I don't see how an RPi is a problem.

EDIT: Realized I forgot to mention another point; not everyone really wants to muck with pointer arithmetic for simple things; this app was written in Python, and as far as I know, the ESP32 chips are mostly C/Arduino; I realize that there exists NodeMCU and such variants, but due to the Raspberry Pi being "Just a computer", you have access to virtually every language under the sun.

Actually esp32's are quite fun and easy to program with micropython. Something like this project should be pretty straightforward and would arguably much easier than a pi. For micropython there is only the python code, no docker containers, Linux maintenance etc. And remote development can be done over a an http repl or even using jupyter notebooks (still have to try but just read about it). Doesn't get much better than that I think
> I hate Electron apps as much as the next person, but it's indisputable that to get a simple desktop app deployed, Electron is easier

Easier than what? Considering you have to use the already ill-suited for UI HTML/CSS/JS cesspit, I'd say Electron is a lot worse for the "simple desktop app" than something like Lazarus.

Using the PI Zero over an ESP doesn't negatively impact the experience using it. Whereas a very bloated website is going to be slow to load and use. I think there is a significant difference.
And constantly compiling and flashing the ESP gets old after a while.
Yeah, this is a pain. I'm glad we have the OTA library, though. Saves so much time.
On the other hand, it is also overkill to learn how to program and deal with an ESP32 if you already know some light linux sysadmining and some high level programming language to set this up.
ESP32 can run μPython which should make it quite a bit easier for those that know some high level programming language. For me using an ESP32 seems like the more reliable, secure, easier and faster solution but people have their preferences and I relate to it being a bit scary at first.
μPython is great - I am not complaining about it, but for someone who is tinkering with a project, it is different enough from Cpython to make things frustrating.

If this was a commercial project, I would agree completely (and from a BOM cost, the manufacturer would be a lot better off investing the time in the dev on a microcontroller)

A restricted port of a language isn't the same thing as the full language. On a Raspberry Pi, you have access to POSIX, system libraries, filesystems, package managers, etc...

μPython is fine, but typically a programming language is about more than just the language.

> On a Raspberry Pi, you have access to POSIX, system libraries, filesystems, package managers, etc

All things you basically don't need for a little project like this.

No, it's not overkill. Using the std Arduino IDE and all libraries available to it, it's basically just a development platform like any other.

The catches are a) you don't have a lot of memory, and b) you have to watch little flickering LEDs to know if your app installed correction.

If this is being designed as a consumer device that may be true, but the ESP devices have their own issues and the pi makes for a great proof of concept!
a qty~1 project like this is dominated entirely by NRE. that's the only thing to optimize.
Pi Zero Ws are $10, ESP32 dev boards are $12. Why pick the more expensive one AND spend more time writing the software?
ESP32 boards are about $4 on aliexpress...

I much prefer using an ESP32 for something like this because I don't have to deal with installing distro's, updates, etc.

sd card wearout, power failures (sd card corruption)...
The ESP32 boards I have were £6, including postage. Can't find a Pi Zero for less than double that when including postage costs.

They're designed for different things though - if you wanted a battery powered version that updated on a button press else slept, ESP, if you want live updates all the time, Pi is fine!

ESP32 uses less power. When you use deep-sleep, you can draw as low as 40microAmps, a sensor I've build on a ESP32 has been running for 3 months on the same battery and I expect one more out of it. The battery is a 2200mA LiPo 18650, so nothing that extraordinary either.

The Pi0W probably won't run a day on the same battery.

The ESP32 has deep sleep, but it uses about the same power as the pizero when running. The ESP32 is a really power hungry:

http://www.geekstips.com/wp-content/uploads/2017/10/esp32-po...

vs

https://raspi.tv/2017/how-much-power-does-pi-zero-w-use

Considering that he pi as way more ram, an SD card and a GPU, and is running 4 times as fast.

the important take away is that they have different use cases.

Though it's important to keep in mind that deep sleep can fairly long, if you use external triggers, you can go days or months in inactivity, which saves A LOT of power.

Though I do agree it depends on your use case, if you're plugged into the wall, a Pi0 might be the better option.

Last year maybe, but I just bought a few for €3.80 each and €0.40 shipping from aliexpress.
Dev boards, or modules to solder onto a circuit board? If you are printing your own board, then yes, the ESP32 is way cheaper. If you are just making a one-off, though, I'm not sure where it wins except in power consumption.
this are dev boards. Just look here for example: https://www.aliexpress.com/item/32656775273.html, the nodemcu dev with USB for 3,55. You can even get a fully working board with a webcam for under 5 bucks (though that does need a UART bridge, no usb included). Unmounted esp32 chips are going for as low as 2,10