Hacker News new | ask | show | jobs
by zokier 1522 days ago
> We lost this in the age of USB..

And got it back with rpi with true gpio pins

2 comments

Well, if your ok with the non-realtime characteristics of the RPi's GPIO via linux userspace, one might as well just buy one of the dozens+ of USB->GPIO adapters all over ebay/amazon/aliexpress/etc with windows/linux/etc drivers.

Or if you need something more advanced than basic LED blinking/etc, just pick up a wemos D1, or any of the dozens of other similar microcontrollers that can be had for a dollar or two that have GPIO and a USB serial interface and do your bitbanging on the ESP8266/etc in an environment that isn't susceptible to a heavyweight OS failing to schedule your task for long periods of time. One can hang that device off a PC and talk to it with simple serial programming/commands or just plug it into the target device as a wifi adapter and do all the control over Wifi+JSON/etc. Which it turns out are basically what most of the USB->GPIO adapters are anyway.

So, in the end, using a RPi for this is really sub optimal on every front, cost, performance/accuracy, complexity, power utilization, etc.

RPI is $70-110 in the United States nowadays. There has got to be a cheaper alternative that is widely available like some sort of NodeMCU?
There are many cheap system-on-a-chip microcontrollers that have enough computing power for many basic uses for which RPi is overkill, and some GPIO and built in wifi and/or bluetooth wireless, and they support dev frameworks like arduino or micropython.

Another comment mentioned a bunch of other models, but I had some fun with the Espressif ESP32 platform where the bulk chips are like $4 each (depending on quantity) but there are some nice beginner-friendly devkits using the same chips for $15 like https://docs.m5stack.com/en/core/atom_matrix or https://shop.m5stack.com/collections/m5-controllers/products... that are sufficient for a bunch of tasks.

Just because demand is high doesn't mean you have to pay more. https://twitter.com/rpilocator tweets stock alerts - and they are pretty regular.