First time with Pico

I had some RP2040 microcontrollers sitting around for some time. I’ve been excited in the prospect that these are very affordable with a load of capability. I’ve been working on a project utilizing a servor and some LEDs I’ll post more on in the near future. As for now, I did my first example using C/C++ and it was cumbersome. Mainly it was the toolchain for me in which had a templated CMake file. I found this hard to understand, edit and get started. I have little experience in that toolset. Recently though I’ve had an interest in learning Rust for a multitude of reasons. One of which is the capability of low level proramming for microcontrollers. There is a solid start to the embedded ecosystem all utilzing Rust.

I found the Rust toolchain very friendly once the requirments were installed. There is a nice template repo for the rp2040 microcontroller to get you started with several examples in the rp crate repo. This also gave me the opportunity to rid my dreaded CMake toolchain. I’ve been interested in just the command runner which is very extensible compared to Make and CMake. This gave me the ease and control for utilizing the Pico. There are a couple different ways for getting your program onto the hardware. I’ve opted to mount the device and use the elf2uf2-rs tool in order to convert my output Rust program into a compatiable Pico program.

I will cover more on my current project later but I’ve been impressed with the capabilities of the Pi. I believe there are 8 different PWM channels which can be controlled by any of the pins. If you have any experience in microcontrollers, you’ll have a head start for sure. You follow the same general steps in enabling and configuring the hardware. In my experience, Rust has had a large learning curve and applying it to microcontrollers has been an added layer of challenge.

Regardless, I grabbed a few more picos because I find them very affordable, accessable and easy to use while expanding my experience in Rust.



Date
December 8, 2022