| Crates.io | device-kit |
| lib.rs | device-kit |
| version | 0.0.1-alpha |
| created_at | 2025-12-21 22:50:00.876028+00 |
| updated_at | 2025-12-21 22:50:00.876028+00 |
| description | Experimental composable, async device abstractions for Raspberry Pi Pico using Embassy (use from GitHub for latest features) |
| homepage | |
| repository | https://github.com/CarlKCarlK/device-kit |
| max_upload_size | |
| id | 1998702 |
| size | 644,211 |
An embedded Rust library for Raspberry Pi Pico, Pico W, and Pico 2 that explores composable, async device abstractions using the Embassy framework.
Note: This library requires the latest Embassy features from GitHub. Use this crate from the GitHub repository rather than crates.io:
[dependencies] device-kit = { git = "https://github.com/CarlKCarlK/device-kit" }
⚠️ Alpha / Experimental
device-kit is an experimental library exploring composable device abstractions
for embedded Rust. The API is evolving and will change.
The crate is currently focused on Raspberry Pi Pico–class hardware and is intended for experimentation, examples, and discussion rather than production use.
Background: See How Rust & Embassy Shine on Embedded Devices by Carl M. Kadie and Brad Gibson.
examples/full.rs)Complete demonstration integrating all peripherals:
cargo full
examples/clock_lcd.rs)Pico W WiFi clock with automatic time sync:
cargo clock-lcd-w
examples/wireless.rs)Pico W WiFi connectivity example:
cargo wireless
examples/ir.rs)IR remote receiver using the NEC protocol decoder library
cargo ir
For reliable IR operation alongside SPI RFID:
The project includes host-side tests for font rendering that run on your development machine (no hardware required).
# Run all host tests (font rendering comparisons against reference PNGs)
cargo test --features host --no-default-features --test '*'
# Regenerate reference PNGs for visual inspection
./scripts/regenerate-text-pngs.sh
# Then visually inspect the generated PNGs and copy to tests/data/text_render/ if correct
See tests/data/text_render/README.md for details on the font rendering tests.
Requires Rust nightly with appropriate target for your board:
rustup target add thumbv6m-none-eabi # Pico 1 (ARM)
rustup target add thumbv8m.main-none-eabihf # Pico 2 (ARM)
rustup target add riscv32imac-unknown-none-elf # Pico 2 (RISC-V)
cargo build # Library only (defaults: pico1,arm)
cargo build --example full # Full peripheral demo
cargo build --example full --features pico2,arm # Full demo for Pico 2
Or use the cargo aliases:
# Pico 1 (default, ARM, no WiFi)
cargo full # Run full demo (--release)
cargo ir # Run IR reader (--release)
cargo flash # Run flash example (--release)
# Pico 1 with WiFi
cargo full-w # Run full demo with WiFi (--release)
cargo clock-lcd-w # Run LCD clock (--release)
# Pico 2 ARM
cargo full-2 # Run full demo on Pico 2 (--release)
cargo blinky-2 # Run blinky on Pico 2 (--release)
# Pico 2 RISC-V (experimental)
cargo blinky-2r # Run blinky on Pico 2 RISC-V (--release)
See ARCHITECTURE.md for detailed information about board and architecture features.
scripts/probeusb.ps1 automates moving the CMSIS-DAP probe between Windows and WSL:
# Show current owner ("Windows" vs "WSL")
powershell -ExecutionPolicy Bypass -File .\scripts\probeusb.ps1
# Give WSL exclusive access (Windows COM port disappears)
powershell -ExecutionPolicy Bypass -File .\scripts\probeusb.ps1 wsl
# Return the probe to Windows
powershell -ExecutionPolicy Bypass -File .\scripts\probeusb.ps1 win
It detects the bus ID automatically (assumes a single probe is connected). If you
have multiple USB entries, set PROBEUSB_PATTERN to part of the device name.
WiFi credentials and timezone offset are provisioned on-device. When the Pico W
boots without stored settings it automatically starts in captive-portal mode
(www.picoclock.net) and hosts a captive portal at http://192.168.4.1. Use that page
to enter your SSID, password, and UTC offset in minutes. The submission is saved
to flash (blocks 0/1) and the device reboots into client mode. Clear those flash
blocks or use the UI option in the clock demos to return to provisioning mode.
Licensed under either:
at your option.