9 releases (5 breaking)
|Oct 2, 2023
|Dec 11, 2022
|Sep 7, 2022
|Jun 23, 2022
|Dec 25, 2021
#1455 in Hardware support
80 downloads per month
Board Support for the Cytron Maker Pi RP2040
You should include this crate if you are writing code that you want to run on
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
Pins structure. This will set up all the GPIOs for any on-board
devices. See the examples folder for more details.
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
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
$ 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!
- Maker Pi RP2040 schematic
- Maker Pi RP2040 Datasheet
- Product page for Raspberry Silicon RP2040
- CircuitPython port
- Maker Pi RP2040 micropython port
SPDX-License-Identifier: Apache-2.0 OR MIT