#rp2040 #maker #stepper-motor #cytron


Board Support Package for the Cytron Maker Pi RP2040

9 releases (5 breaking)

0.6.0 Oct 2, 2023
0.5.0 Dec 11, 2022
0.4.0 Sep 7, 2022
0.3.0 Jun 23, 2022
0.1.2 Dec 25, 2021

#1455 in Hardware support

Download history 16/week @ 2023-10-30 2/week @ 2023-11-13 22/week @ 2023-11-20 31/week @ 2023-11-27 1/week @ 2023-12-04 9/week @ 2023-12-18 18/week @ 2023-12-25 9/week @ 2024-01-01 1/week @ 2024-01-08 12/week @ 2024-01-22 35/week @ 2024-01-29 1/week @ 2024-02-05 32/week @ 2024-02-12

80 downloads per month

Apache-2.0 OR MIT

58 lines

Board Support for the Cytron Maker Pi RP2040

You should include this crate if you are writing code that you want to run on a Cytron Maker Pi RP2040.

This crate includes the rp2040-hal, but also configures each pin of the RP2040 chip according to how it is connected up on the Maker Pi RP2040.

Cytron Maker Pi RP2040

Maker Pi RP2040 is an embedded robot control board by Cytron.
You can find more info about it on the Maker Pi RP2040 product page


To use this crate, your Cargo.toml file should contain:

cytron_maker_pi_rp2040 = "0.5"

In your program, you will need to call cytron_maker_pi_rp2040::Pins::new to create a new Pins structure. This will set up all the GPIOs for any on-board devices. See the examples folder for more details.

Running examples

To compile an example, clone this repository and run:

makerpi_rp2040 $ cargo build --release --example <name>

You will get an ELF file called ./target/thumbv6m-none-eabi/release/examples/<name>, where the target folder is located at the top of the repository checkout. Normally you would also need to specify --target=thumbv6m-none-eabi but when building examples from this git repository, that is set as the default.

If you want to convert the ELF file to a UF2 and automatically copy it to the USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run:

makerpi_rp2040 $ cargo run --release --example <name>

If you get an error about not being able to find elf2uf2-rs, try:

$ cargo install elf2uf2-rs

then try repeating the cargo run command above.



Flashes a sequence across the Digital IO Status LEDs


Rotates a stepper motor through 360 degrees clockwise then anticlockwise.
Note that this requires a specific stepper motor from Seeedstudio


Cycle through colors on the pair of onboard RGB LEDs


Plays a sweeping frequency pitch through the on-board buzzer.
Note: the example uses a short pulse length to keep the volume down - see documentation in the code to make it loud!

SPDX-License-Identifier: Apache-2.0 OR MIT


~154K SLoC