by geerlingguy · 4y ago · 0 comments
I know there are still other advantages of the ESP32 (especially in some of the newer revisions, like upcoming Matter/Zigbee support built in), but I think some people are too quick to dismiss the Pico's RP2040 as overpriced compared to the alternatives.
Back in the early days of RasPi there was a competitor, the BeagleBone Black. It was similar to the Pi in many ways, but included embedded MCUs that were meant in much the same ways as the Pico's PIO. You could use them to bitbang protocols that would be difficult/impossible/unreliable to run on the SoC itself.
I thought it was a brilliant idea, but the BeagleBones never got the same level of support that the Pi did. The few times I tried using my Black, I ran into numerous deal breaking bugs.
It's great to see the spirit of this idea is still alive and well. I've got my fingers crossed that they somehow convince Broadcom to build PIO into their SoCs.
The Beaglebone Black was pretty nice compared to contemporary Pi's for embedded work: way more GPIO pins, with female headers rather than male (lower chance of accidental short circuits; easier to just jam components or wires in there like it's a breadboard.)
https://www.righto.com/2016/08/pru-tips-understanding-beagle...
I'm sad that the beaglebone didn't "win" versus the raspberry pi. I have several Beaglebone Blacks and they're great little devices, even if the PRU is a little hard to use.
Bela includes a xenomai based linux distribution which gives you a hard realtime OS for audio whilst normal linux running as a xenomai task, so you get all the normal productivity and development tools, but your audio is able to run at really low latencies compared to 'normal' OS support.
The Black is low power by todays standards, a single core @ 1Ghz I believe, but it's plenty of power for many audio apps, and boots within seconds, so ideal for embedded applications.
In a former life, we had around 1k BB Blacks and 2k BB Greens deployed in greenhouse automation devices before that startup went bankrupt.
The processors were rather under-powered compared, but generally up to the task. Great little devices.
* 13 bit 8M baud UART receiver for Digipan x-ray sensor. Alternative would have been a small FPGA, but then I would have to deal with several systems. Still had to reduce bit depth of output data, as I couldn't reliably stream data out over USB1.1.
* Sequence and read out the data from EPC901 line sensor for a crude spectrometer- while it might have been done with SPI, bitbanging the control lines and bit-twiddling the read data, I felt that the PIO solution was much more elegant- just launch the statemachine and wait for DMA transfer to finish.
On the other hand, I tried but couldn't really figure out a way to implement stepper motor control with speed ramping in PIO and resorted to porting AccelStepper to RP2040 (which worked out great in the end).
https://github.com/kbeckmann/PicoCart64/
The creator tweets about it frequently [0], in particular this thread [1].
[0] https://twitter.com/kbeckmann/
[1] https://twitter.com/kbeckmann/status/1538634588020424708