Live data from Hacker News

Unpopular Opinion: Don’t Use a Raspberry Pi for That

set-inform.com

141–150 of 270 posts

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#141
post #42

Earlier quoted context omitted.

Shhhh stop spilling our secret to the software people... The semiconductor shortage is bad enough already... That said though, programming embedded devices like Arduino and ESP32 needs a completely different style of thinking than with high level languages or web stuff. Things like MicroPython reduces the friction just a bit to make it easy enough to get on board.

The thing that tripped me up the most was concurrent tasks. In languages like Go or JavaScript it’s pretty easy to figure out how to decrement a timer or wait until x time to perform a task without having the waiting period be blocking. On an arduino, you have a few options but none of them are likely to be familiar to high level software devs. It isn’t rocket science, but there are loads of little details like that…

I recently used Rust (RTIC) for that and it was relatively pleasant experience, it had "tasks" (that cleverly used unused interrupt handlers for context switching so it was nice and efficient) that could be triggered by various stuff, not unlike threads, and they had priorities. As long as you busy waited only in the main, lowest priority one, it "just worked"

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#143

Why am I getting a cloudflare error? Visiting from India via Chrome. Msg: I got an error when visiting set-inform.com/2021/08/24/unpopular-opinion-dont-use-a-raspberry-pi-for-that/. Error code: 1020 Country: IN Data center: fra08 Timestamp: 2023-03-22 13:33:46 UTC

One thing CloudFlare can do is basically replicate the old-school abuse-and-attack-reduction tactic of blocking most Asian IP blocks.

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#144
post #118

Earlier quoted context omitted.

There are different kinds of timing issues. There's knowing the time, which you can do with something like NTP. That the RPI can manage just fine. And there's acting with precise timing, eg, if you need to control a mechanism and reliably react on a deadline of a few ms. A RPI doesn't perform well there, which is why 3D printers use microcontrollers instead.

A few ms? In my experience that seems well within the capabilities of Linux. I guess last time I measured wasn't on a Raspberry Pi. I'm kinda tempted to take a shot at profiling this and writing up a blog post since it seems like a useful topic, although it will probably be a few months until I can get around to it.

Being within the capabilities of something and guaranteeing that it will never exceed that are two different things. At least in the past real time guarantees for Linux came as part of an optional patch set for the kernel since guaranteeing that an algorithm would complete within a set time frame or that things like priority inversion issues would be handled correctly came with a performance cost.

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#145
1. Too expensive. Maybe in 5-10 years, pricing will return to normalcy. When inventories are tight, they should backlog fulfilling corporate orders because they drive scarcity with deep pockets that harm innovation and accessibility for average retail customers. Have a preorder waiting list rather than unactionable "out-of-stock" indications that lose sales.

2. Probably can do the same (electronics) with an Arduino or run (a lightweight job) in a container on an existing computer.

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#146
post #42

Earlier quoted context omitted.

Shhhh stop spilling our secret to the software people... The semiconductor shortage is bad enough already... That said though, programming embedded devices like Arduino and ESP32 needs a completely different style of thinking than with high level languages or web stuff. Things like MicroPython reduces the friction just a bit to make it easy enough to get on board.

The thing that tripped me up the most was concurrent tasks. In languages like Go or JavaScript it’s pretty easy to figure out how to decrement a timer or wait until x time to perform a task without having the waiting period be blocking. On an arduino, you have a few options but none of them are likely to be familiar to high level software devs. It isn’t rocket science, but there are loads of little details like that…

You can always run Espruino on your ESP32 -- a nodejs like environment for microcontroller. It works well and has lots of drivers for different components.

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#147
post #10

I often end up giving the opposite unpopular opinion: RPis are overkill for a lot of DIY IoT uses. Want to have something that opens your curtains or flashes some RGB lights in your hallway or whatever? Pick yourself up an Arduino / ESP32 with built-in WiFi, often an Ethernet port, tons of GPIO. It consumes milliwatts of power, boots in under a second, and is cheap enough to be disposable.

Well, it is right-sized to run a hub controlling all that little devices.

But yeah, especially now with various ESP32 firmwares like ESPHome you can essentially just make a YAML with specification on where to listen and what bit to flip and get simple switch/controller with zero actual coding.

There is even custom firmware to turn off-the-shelf IOT devices to work with "open" standards.

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#148

Earlier quoted context omitted.

Happy that yours works well. Many problems don't show up until you hit larger numbers. We deployed over 1k RasPi's for a particular customer. We averaged about five reboots per day. On top of that I had to deal with the RasPi Organization's insistence that they were not an ODM. Though these were the RasPi B's and RasPi2 B+'s. I'm sure the reliability has gotten better over the years. I'm not a big TI fan, but everyth…

Raspi's are stable if you respect 2 things : - avoid writes to sd card too much (log2ram mitigates this, alpine in read-only solves this) - plenty of power (the recent 3 and 4 have huge sipkes of current draw !) Do you know the reason for your reboots ? Also before the 3+, the die have no RF shield. The B and 2 B+ are exposed if you don't use a metal case with a seperation from the PSU.

> plenty of power

Actually this is a good point I forgot about.

I had one Pi which would reboot or hang every week or so. Dismissed it for a while but then decided to troubleshoot it. I had a USB cable tester, and quickly found that the USB "charging cable" I had bought from a local shop had a 1 Ohm resistance! Threw it away and replaced it with a good one and never had an issue again.

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#149
post #5

Do NUCs have GPIO or do I have to stick to a SBC for those?

Industrial mini PCs will often have 8-32 GPIOs for controlling equipment. Expect to pay a hefty markup for one of these from a name brand, or a moderately reasonable price for a no-name Chinese NUC.

The NUCs you see from e.g. Intel had a "custom solutions header", which was a bunch of common buses on an internal header you could expose with some bios config and wires, including 1-2 GPIOs, but that was it.

Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That

#150
post #45

If you don't need GPIO, then you don't need a RPi. They are useful, but an old laptop can do most things a Pi can do, and putting them to use keeps them out of the landfill longer.

I'm a bigger fan of Dell desktop that companies have put out to pasture after a refresh cycle. They're very expandable, have plenty of horsepower, and the idle power draw isn't that bad. The better thermal characteristics compared to a laptop usually lead to very long life as well. Related to a sibling comment, a decent UPS could power a Dell like that for a couple of hours if it's mostly idling.

That and latitude laptops.

Optipliex desktop is around 10-15W idle

Laptops with screen off can hit around 5W (close to pi under load).

I would assume what loads the pi would almost be idle in these older dell machines.

Post reply on HN