Running Rust “blinky” on Sparkfun Pro Micro RP2040
This is surprisingly involved. My main point of confusion seemed to result from the fact, that there is no simple LED diode on the board. So, you cannot just do the usual “blinky” dance, that is setting a pin “high” and then setting it “low”.
Instead, pin 25 is connected to a multicolor, RGB light, also known as a “Pixel”, or technically as WS2812. It will not work when just set to high level. Unfortunately.
But, with Rust, we can have it work quite easily!
tl;dr: clone embassy;
modify examples/rp/src/bin/pio_ws2812.rs
to change
PIN_16
in PioWs2812
constructor
to PIN_25
;
hold Boot Button
and press Reset Button;
run cargo run --bin pio_ws2812
.