Do you need to transfer data to and from a Raspberry Pi Pico, or similar RP2040-based board, connected to your computer by USB? Here’s a neat way to achieve it without any tedious mucking about with the USB stack. Apart from a couple of questions on the Raspberry Pi Forum, there’s not much in the way of documentation, so here’s a write-up.
In part one, I described an IoT demo setup based on the Raspberry Pi Pico and the Waveshare Pico SIM7080G Cat-M1/NB-IoT cellular add-on board, and wrote about some of the design goals. Now it’s time to implement that design with some C++ code: a host application, drivers for the modem, the HT16K3-based display and the MCP9808 temperature sensor, and some third-party libraries to decode incoming commands formatted as JSON and encoded in base64 for easy SMS transmission.Continue reading
To turn the Raspberry Pi Pico into an Internet of Things (IoT) device, you need to add wireless connectivity. I thought I’d give it go, to see how straightforward it might be to connect the Pico to cellular networks and have a bare-metal app written in C++ run the show. For a modem, I chose to use Waveshare’s suitably sized Pico SIM7080G Cat-M1/NB-IoT.Continue reading
A little while back I wrote about Adafruit’s QT Py RP2040 and how it makes a nice, compact Picoprobe. That’s a Raspberry Pi RP2040-based device used as a bridge between your computer and a target device for debugging work using Single Wire Debug (SWD). I first used the QT Py RP2040’s side-mounted GPIO pins, but SWD hosting is a great role for the device’s QT Stemma connector.Continue reading
When I started programming the Raspberry Pi Pico, I used the C language because I’ve worked with it before. The Pico’s SDK also supports C++, but I’ve never used C++. When I started Mac programming in the early 1990s, C was the clear choice. By the time I needed to do object-oriented programming, Apple had bought NeXT and the way to do OOP on macOS was Objective-C not C++. The Pico has given me chance to join the party.Continue reading
I’d like to introduce you — if you’re not already acquainted — to the Z Shell’s incredibly handy function zmv. If you ever need to change at the command line the names of a batch of files consistently, it’s the tool you’ll want to turn to first. It’s not well known, and having been given the nod by a colleague, I thought I’d explore and pass on some notes about taking advantage of it.Continue reading
Here’s something a little different: a basic C project that you can follow to build a fun handheld game with a Raspberry Pi Pico. Your mission: to enter a dark cave, and then locate and destroy the monstrous Wumpus.Continue reading
Last week I tried the Raspberry Pi Pico with MicroPython. The Raspberry Pi Foundation would be sufficiently commended for providing only this level of programming support. MicroPython leverages the Python skills of the many Raspberry Pi users out there and is accessible to plenty of others too. But the Foundation has also provided a C/C++ SDK, and this opens the Pico up to serious embedded-system developers too.Continue reading