I guess it depends on what you're doing. I like working with hardware and low-level software.
Unpopular Opinion: Don’t Use a Raspberry Pi for That
221–230 of 270 posts
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#222Given in Canada it's cheaper to just buy a small Intel PC than a raspberry pi 4 of late, I've been exploring alternatives lower down ... ST-Micro's stuff as an alternative to Arduino (which is also $$$ here). I guess it depends on what you're doing. I like working with hardware and low-level software.
I need to split some services off of my overloaded Raspberry Pi 4 but I just can't find any in stock anywhere. That NUC is so low priced it's hard to resist pulling the trigger, and in all likelihood it probably crushes the RPI4 in terms of performance.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#223Earlier quoted context omitted.
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.
No, the consistency of the timing is terrible on Linux. Seriously, stick a scope or logic analyser on e.g. an I2C line and look at the timing consistency. Even on specialised kernels for realtime use, you can have variable timing delays between each transaction on the bus. And this is all in-kernel stuff that's inconsistent--it looks like it's getting pre-empted during a single I2C_RDWR transaction between receipt of…
> control a mechanism and reliably react on a deadline of a few ms
I actually did measure this with an oscilloscope on embedded Linux (not a raspberry pi). A PPS signal was fed into Linux, and in response to the interrupt Linux sent a tune command to a radio. Tuning the radio itself had some unknown latency.
End-to-end, including the unknown latency of tuning the radio, I never observed a latency that would even round to 1 ms. That's unpatched and untuned Linux, no PREEMPT_RT. I didn't dig any further because it met our definition of "reliable" and was well, well within our timing budget.
I'll be the first to admit it wasn't some kind of rigorous test, just a casual characterization. I would not suggest anyone use Linux for a pacemaker, airplane flight controller, etc.
This is making me itch to buy an oscilloscope and run some more thorough tests. I'd like to see how PREEMPT_RT, loading, etc changes things.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#224Earlier quoted context omitted.
I guess that's true for a certain wealth target. If you consider the Pi as the sweet spot for price, have at it. But https://pine64.com/product/pinecone-bl602-evaluation-board/ costs $4. It fits a different sweet spot for price, power consumption, etc. A drawer-full of 20 Pis could run me $2000. A drawer-full of Pinenuts would run me... well perhaps $2000 because I could fit 1000 of them in a drawer. If I want to bro…
That’s apples to oranges, more comparable would be a pi pico w, which is like $6, has better documentation, and is more likely to be available when you need one. I have a bunch of pine devices, but if you think raspberry pi’s are difficult to come by, finding a pine device in stock over the last few years has been a challenge at least for me personally. Things have started to get much better though, it seems.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#225Given in Canada it's cheaper to just buy a small Intel PC than a raspberry pi 4 of late, I've been exploring alternatives lower down ... ST-Micro's stuff as an alternative to Arduino (which is also $$$ here). I guess it depends on what you're doing. I like working with hardware and low-level software.
I have to say these look really tempting: https://www.aliexpress.us/item/3256805075742151.html I need to split some services off of my overloaded Raspberry Pi 4 but I just can't find any in stock anywhere. That NUC is so low priced it's hard to resist pulling the trigger, and in all likelihood it probably crushes the RPI4 in terms of performance.
Of all places, London Drugs sometimes carries them. Places that sell POS (point-of-sale) systems are more likely to have the small form factor computers.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#226Earlier quoted context omitted.
Many NUCs are whisper quiet and just as reliable as an RPi. Often more so given the number of folks that run everything in their RPi off an SD card without considering the lifespan of them. I didn’t replace my RPi with a NUC but I did get a Celeron powered mini PC. It’s basically silent and has been happily running Ubuntu under my desk for over a year now.
If new, sure, but then you're in for a lot more money than the Pi. If it's used, I'm not interested.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#227I 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.
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.
Many still don't grasp how powerful ESP32 actually happens to be.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#228The file server is an old i7 2600k that used to be my desktop PC before I added some hard drives and installed Unraid on it. Unraid makes managing docker containers incredibly easy, especially with the Community Applications and Auto Update Applications plugins.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#229Earlier quoted context omitted.
It's still an A-profile MPU and not an R- or M-profile MCU, and while it will be fast it will have less deterministic behaviour than we might like. If you disable the caches and MMU you'll get better consistency. But wouldn't we expect ~microsecond accuracy from a properly-configured MCU?; ~millisecond accuracy is not a particularly high bar.
You can read pins (well one) with sub-microsecond latency using the Fast Interrupt Request, but I have not tried this myself. I think a PI would be more than capable of matching most microcontrollers just due to its very fast clock speed. Add multiple cores with the PI4 and you get a crazy amount of compute between each pulse as well. There are a bunch of clocks that run plenty fast to enable high resolution timing a…
Low latency can be a good thing, but it's also not related to consistency, particularly when you start looking at what the worst-case scenario can be.
Re: Unpopular Opinion: Don’t Use a Raspberry Pi for That
#230I 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.