3 ms·
Good on the guy for getting his goal over the line! Not the most elegant approach perhaps, but it works and going from nothing to working is worth a lot. I'm w
by sokoloff 5y ago
Good on the guy for getting his goal over the line! Not the most elegant approach perhaps, but it works and going from nothing to working is worth a lot.
I'm with the group that thinks a Wemos D1 or other ESP8266 micro is probably a better match for the application (if you want to keep open a Wifi control option; if not, literally any microcontroller board would be fine), but if you know Linux and python and not C or have never touched a microcontroller before, not a lot of harm in going for the PiZero.
What I like about microcontrollers is that they just work for years on end. I've got one at home that's been running for about 10 years now, untouched (which makes sense, since most of our gadgets work that way as well).
- cartoonworld 5y agoWell, instead of a teensy, the esp32 is sure a good bet. But since you've got the Pi, the next logical step is to get an rtc upgrade and run chrony/openntpd and a backup dns cache. Why not? I mean its right there on the desk. Could add a quick binary clock for practicality. Since you might now be dependent on the thing, its easy to add snmp for monitoring, hack in some rrdtool or whatever to graph your sit/stand time, maybe a serial connection to monitor your UPS power situation, and you get a free Pi-hole by now! Probably a little overkill to run wireguard on the thing, though. But honestly, why stop there? Have it control some functional LED lighting[0] (Zack uses an ESP32 instead of the pi--must not care about clock drift. The biometric sensor is also a little expensive and uncomfortable looking.) with suntime[1] for a perfectly and coherently illuminated environment. For the extremely paranoid, yet lazy and obsessive (who does that not describe?) you can grab an extra wifi dongle with raw monitoring mode to have some fun with trackerjacker[2]. Use an innovative static base station running map mode, so when an influx of unknown devices with increasing strength and/or known vehicle SSIDs or PAN beacons are detected, just go full Red Alert (using those very practical leds) and score a quick win by raising the desk and commanding your IoT lighting for a deft escape. Maybe you can use this for the girlfriend too, since by now you've already got rrdtool or cacti or whatever graphing the desk height and trackerjacker output from her iPhone and Jeep Latitude hotspot, you could also use that capability to gain insight as to when it should reach out and trigger your coffee maker's ESP32, certainly while raising the desk. [0] - https://www.youtube.com/watch?v=g6n8XLmZ__I https://www.youtube.com/watch?v=g6n8XLmZ__I [1] - https://github.com/SatAgro/suntime https://github.com/SatAgro/suntime [2] - https://github.com/calebmadrigal/trackerjacker https://github.com/calebmadrigal/trackerjacker https://reconshell.com/trackerjacker-maps-and-tracks-wifi-networks-and-devices/ https://reconshell.com/trackerjacker-maps-and-tracks-wifi-ne...
- dkong 5y agoYeah, this is certainly not the most elegant or efficient solution to the problem in terms of power usage, processing power, etc. But honestly, I don't really care. My criteria were: 1. What's easy? 2. What's cheap? 3. Raspberry Pis are cool. I wouldn't mind playing with one. I actually have programmed a microcontroller in C before (an Atmel Butterfly) but that was... 15 years ago? I haven't written C in at least 5 years. I'm fairly optimistic that the Pi would have continued for years. It has no connection to the internet, and the code is extremely simple. If I were designing a device that somehow needed to run without being touched for 10 years, then definitely a microcontroller would have been the way to go. Or maybe even just a timing circuit, no processor involved.