Dev Kit Weekly: Raspberry Pi Pico RP2040 Development Kit

September 09, 2022



Are you just getting started in electronics? Or maybe you’re just looking to build something fun, like a Simon game, a remote-control car, a mini drone, or even a smart robot that can detect and avoid objects less than 15cm away by stopping, moving backwards, and pivoting 90º. That last sentence was certainly hyperspecific, but these are all examples of things you can do with the Raspberry Pi Pico microcontroller board, which is powered by the RP2040 MCU, the first MCU ever designed by Raspberry Pi themselves.

The 40nm RP2040 MCU, measuring just 7mm x 7mm, houses a dual-core Arm Cortex-M0+ processor that runs at up to 133 MHz that’s accompanied by accelerated integer and floating-point libraries and 264kB of on-chip SRAM. The Raspberry Pi Pico microcontroller board itself includes an additional 2MB of QSPI flash and supports a DC input power range between 1.8V and 5.5V. It maintains an operating temperature range between -20°C to +85°C, which can be monitored by an on-board temperature sensor.

Aside from two UART, two SPI, and two I2C controllers, the Pico also uniquely includes eight programmable I/O (PIO) state machines that allow you to customize your peripherals to support the specific application you want to develop.

Long story short, this tiny board packs a solid punch for its size.

But all those hardware components and I/O options are meaningless without software and development environments to bring those hardware components to life. In this case, you’ll be using the Raspberry Pi Pico C/C++ and Python SDKs.

The C/C++ SDK includes libraries and a build system to write programs on RP2040-based devices. The SDK also includes libraries to help you deal with USB (such as drag-and-drop programming over USB mass storage), multi-core programming, synchronization, etc., as well as incorporate and manage high-level functionality like audio generated from the PIO.

There are 229 projects with complete example code you can experiment with available on Raspberry Pi’s GitHub. Those help you create just about anything with the C/C++ SDK, from simple applications and low-level software to entire runtime environments built on MicroPython.

Using this SDK opens the door for implementations like the open source machine learning framework TensorFlow Lite Micro. This library, available on GitHub, specifically targets the Raspberry Pi Pico and will help you run ML models that can perform sensor analysis tasks like voice recognition, person/object detection in images, and gesture recognition.

I don’t know about you, but if I wanted to build one of those robots we were talking about earlier, I’d be very interested in that.

As for the aforementioned MicroPython development environment, you don’t have to build one because you’ll have access to one through the Raspberry Pi Python SDK. You can download the pre-built binary directly from Raspberry Pi’s Documentation page; or, if you do want to build it yourself, you can find the source code in Section 1.3 of the Python SDK datasheet. This firmware, a Python 3 implementation optimized for microcontrollers and small embedded systems, is designed to be efficient, drawing on the Pico microcontroller board’s strengths (like its proportionally huge storage capacity).

The MicroPython firmware also comes with a comprehensive PIO library that will help you write and interact with PIO programs, making it easier to create hardware interfaces or even something simple like extra serial ports.

But back to the fun stuff, the MicroPython environment is also where you can do some really creative projects, like the robot-building. There’s even a tutorial available on YouTube that will walk you through the steps of using MicroPython to program your robot to be able to detect and avoid both stationary and moving objects. Aside from the visual guide, everything you’ll need for that is also available on GitHub.

True to the Raspberry Pi philosophy of providing competitive performance capabilities and features at uber-affordable prices, this little guy could be yours for a mere $4. Up until recently, element14, OKDo and RS Group did a lot of the licensing and manufacturing for Raspberry Pi chips. But because of supply chain uncertainty, OKDo and RS Group have pulled out, leaving Raspberry Pi tech a bit difficult to get ahold of. But, we at Embedded Computing Design have your back. Over our next few months, we’ll be giving away 1,000 Raspberry Pi Pico microcontroller boards to members of our community, including at A.I. Day on September 20th. You can register here for that event, but you will have to be in attendance to win.

But of course, you also have the option of entering the raffle below. If you win either in the raffle or by attending a virtual event or other activities in the ECD community, we’ll ship your Raspberry Pi Pico right to your home at no extra cost.

Powered by Formstack

So, whether you’re a seasoned hobbyist, or you’re just dipping your toe into the development world, the Raspberry Pi Pico has you covered. That wraps us up for this episode. As always, thanks for watching, good luck in the raffle, and we’ll see you on the next episode of Dev Kit Weekly.