by demondemidi · 2y ago · 0 comments
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 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.