5 ms·
What I'll never understand about this whole thing is why most people seem to easily tolerate the rigamarole of maintaining an entire host SBC OS and sending or
by zxexz 3mo ago
What I'll never understand about this whole thing is why most people seem to easily tolerate the rigamarole of maintaining an entire host SBC OS and sending or even cross compiling binaries to it, for microprocessor work. I much prefer maintaining a dev env on machine(s) and sending and flashing a binary over the wire. Maybe I just dislike state, but the pico (and several other MCU ecosystems these days) make it so easy to
- teaearlgraycold 3mo agoI'm sure you're aware, but for the record the Pico has state. That's one of the best things about it. You have a very fully featured Python environment (or rust, or C) with a read/write filesystem. The WiFi SDK is also super useful. They can make HTTP requests (and HTTPS without full CA validation), host an HTTP server, even host an access point.
- ssl-3 3mo agoThe advantage is familiarity, I think. Like: I suck at code. But I've known how to walk around in *nix systems and use things like bash to chain together commands like awk, grep, and sed for ~30 years. Maybe I'd even toss in some badly-cooked perl or python (or both!), when that seemed necessary. For a very long time, I've been able to get some things done, but my skillset was focused on doing these things with real computers with live filesystems and real user interfaces, not MCUs. So, some years ago: When I wanted to turn a window fan on and off based on some network-retrieved weather conditions, I didn't even consider an MCU. I didn't want to learn a new way of doing things; I just wanted a computer to get some data and decide whether to turn the fan on and off. And I wanted that done sooner instead of later. I accomplished this with a Raspberry Pi Zero W -- with the whole OS. I didn't cross-compile anything. I didn't have to target some weird-looking external environment, or learn a new way of doing things. Setting up the dev environment was very familiar: Dump a binary onto an SD card, boot it, get it onto the network, and use it. I just SSH'd into that tiny little computer like I would any other Linux box and wrote my stupid little cobbled-up scripts right there, in-situ, on the final device that would be performing the work -- with a familiar interactive shell. The end result worked very well. I'm not ashamed of any of this at all. --- Later, I switched from networked weather reports to an RTL-SDR dongle and software decoding to listen for over-the-air broadcast reports from someone else's nearby APRS weather station, and used that as a source of weather data instead. Can we even get that done in MCU land? (Should we even try to do so for just one window fan?)
- teaearlgraycold 3mo agoRegarding the SDR, the Pico can act as a USB host (honestly a huge win as you can plug in a keyboard/mouse). But it’s not able to run at USB 2 speed. There’s no software for it and the CPU probably isn’t powerful enough. So in that case a Linux machine is completely justified. I tell people to reach for a Pi when they need both Linux and GPIO. But if you just need GPIO you should really save the money (and get major wins in simplicity) with the Pico. I get the familiar angle of using a Pi Zero. But don’t be intimidated by the Pico. Especially these days with the help of an LLM, you’re not slowed down too much. The version of Python they run feels very familiar. The tooling is good. They’re awesome!
- ssl-3 3mo agoOh, these days I still suck at code. And with the bot, I can hammer out a project for ESP32 or a Pi Pico in no time. (I didn't even put together the dev environment for that. I had the bot do it.) And because I still suck at code: If I want to create something myself, then I still get to do that with a Linux box using unix methods. That all said: I do enjoy working with RP2040 PIO assembler sometimes. The combination of its severe limitations and robustly resolute timing makes it both approachable, and fun. :) Anyway, I think all methods are OK. There's no reason to judge them. (I think it's also OK to just use a computer to read Facebook, or as a porn machine, or to become an Amish leatherworker and leave all of this digital nonsense behind.)
- teaearlgraycold 3mo agoThe PIO is super cool. I haven't had a good use case for it yet but will enjoy messing with it once I do. Party I am petitioning for passersby who might be wincing at the new prices for Pi 5s etc. for starter electronics/programming projects when they could save a ton of money with a Pico. I have to assume that a huge chunk of Pi 5 purchases from consumers end up with the computer either stuck in a drawer, having been used for a couple days, or running a workload they are completely overpowered for. Every time I see the new prices I wonder how much lower they would be if the consumers were better informed and demand was more appropriately redirected. To give a specific example of a misused Pi, I've seen an RFID access system made by a hobbyist (low stakes, no need for professional/commercial solutions) running on a Pi 3. When the system glitches (another matter entirely - messy code) and needs to be rebooted you need to wait a minute or two for Linux to start up. I'm planning to replace this system with a Pico 2W. All it needs to do is handle a couple of buttons, a small LCD screen, and an RFID reader. We can handle all of that and a WiFi-accessible web admin interface using a microcontroller. Not only is it wasteful (for whatever that's worth) to have a quad core CPU, 1GB of RAM, and a whole Linux OS to perform such a trivial task. It's also leading to issues with complexity and performance.