An easier way to control Raspberry Pi Pico.
Extend IO for smart devices (Android/macOS/Windows/Linux) or enhance computing for Pico.
Dependencies:
- Rust (Cargo)
- picotool (only for elf to uf2)
rustup target add thumbv8m.main-none-eabihf./build-firmware.shOutput binary: firmware-output/copi-firmware-pico2.uf2
(Will use nightly to compile Pico2 firmware because the feature #![feature(generic_arg_infer)] is required)
cargo build --bin copiOutput executable:
target/debug/copi
$ target/debug/copi -h
Usage: copi [COMMAND]
Commands:
list List all connected boot pico devices
flash Flash copi firmware to the pico device
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Hold the Pico2 BOOT button while connecting to the PC
$ target/debug/copi listNote the Pico2 mount location, e.g. /Volumes/RP2350 (macOS) or F: (Windows)
$ target/debug/copi flash /Volumes/RP2350or
$ target/debug/copi flash F:target/debug/copi
Found device: "xxxxxx"
listening on 0.0.0.0:8899
curl -X POST http://localhost:8899/gpio/output-init -H "Content-Type: application/json" -d '{"pin": 25, "value": true}'