The PI is about making hardware hacking accessible on a linux-based platform.
A refurb PC fails horribly at that.
The PI is about making hardware hacking accessible on a linux-based platform.
A refurb PC fails horribly at that.
EDIT: added STM.
I have also used a different Pi Zero W with an SDR dingle to decode APRS weather data, while also using GPIO to read a local DS18B20 temperature sensor and to switch a solid-state relay.
I could have done this last thing with any random Linux-ey PC plus an Arduino, but then I'd have two problems. (It would have also cost me rather substantially more money: I bought these Zero Ws very, very cheaply from Microcenter.)
Not mine, just something I found. I had a feeling one could run a GPS backed NTP server on a microcontroller without too much difficulty.
And I like ntpd. I also like self-contained systems that I can tweak without using a compiler and a dev environment. I'm a fairly competent computer user, but I have zero aspirations of being a programmer when I grow up.
(If a Pi Zero W can do the job, then: Why must it not do that job?)
I'm generally a fan of make it small, and Linux is kind of the opposite of that. Everyone is entitled to their own opinions on the topic as always!
Thanks to these discussions here in these threads, I've upgraded my Raspberry Pi 4 router-box (which has cheerfully been running OpenWRT for years) to the latest stable OpenWRT. It took some time to get this done but it is done, and I managed to get it done without tossing my existing configuration or disabling the household's Internet access for more than a few tens of seconds at a time.
And I've also gone through the NTP config on that router, which [previously] was never quite right -- mostly, due to complications with BusyBox also knowing how to be ntpd (ffs) and poor system documentation (which I think I may spend some time improving).
Sure, there's other ways to do all of these things... but Raspberry Pis are fun for me in ways that other hardware (black-box streaming devices, black-box routers, even black-box GPS clocks) lack. I even take one or two of them car camping with me, where their somewhat unique ease of downloading and flashing an entire pre-configured specialized system image onto a different easily-swapped, inexpensive SD card can be tremendously useful[0].
[0]: Stuff I can't do with an MCU, or with a regular PC. "Oh, this carefully-prepped LibreELEC Kodi can't work for Movie Night in the Woods because the USB stick I carefully copied a bunch of movies to is somehow empty and the data that should be there is nearly three hours away? Let's just take that card out (preserving that configuration completely), and follow the directions to get a decent Plex client working the Right Way on a different cheap-like-chips SD card. I can do all of this from my phone."
I have a Pi4 hooked up to a motion detector, a camera, a solenoid and some SCRs for a floodlight. A python script waits for an event interrupt from the motion detector on a GPIO. Then it turns on the lights and opens a door via GPIO, and starts recording in another thread (via a pipe to gstreamer). When the motion times out, it pushes the video to an private S3 bucket (using my own handshake for a token so that it can't be spammed).
(I used to have some GPIOs connected to motorized cat toys so that I could trigger them remotely while watching an realtime stream, but that throttled the above camera which was more important.)
... It is also a BLE gateway that monitors 4 temperature sensors, and also pushes that data up to the cloud with another python script.
... and it also is an MQTT gateway for a few NXP WiFi devices scattered around the yard, and their data ... you guessed it... is pushed up to the cloud (they control sprinklers because BLE doesn't have the range). I can log into my personal website and turn sprinklers on from anywhere my phone works.
Sure I could do the WiFi and BLE with a PC, but why waste the energy and space when I can use a tiny Pi that is already doing a bunch of other things?
I just keep adding things to it because I have my own cloud system (HomeAssistant is a big fat bloated joke).
Having a good BLE sensitivity and WiFi chip on a tiny linux board that runs dozens of python processes listening to GPIOs, and running Gstreamer would be too much of a hassle with a PC and far beyond an arduino.