Go to file
2024-10-17 13:21:47 +02:00
.cargo initial commit 2024-10-17 12:02:00 +02:00
.vscode initial commit 2024-10-17 12:02:00 +02:00
src simplify pattern matching in leds task 2024-10-17 12:07:09 +02:00
.envrc initial commit 2024-10-17 12:02:00 +02:00
.gitignore initial commit 2024-10-17 12:02:00 +02:00
build.rs initial commit 2024-10-17 12:02:00 +02:00
Cargo.lock initial commit 2024-10-17 12:02:00 +02:00
Cargo.toml initial commit 2024-10-17 12:02:00 +02:00
COPYING initial commit 2024-10-17 12:02:00 +02:00
flake.lock initial commit 2024-10-17 12:02:00 +02:00
flake.nix initial commit 2024-10-17 12:02:00 +02:00
memory.x initial commit 2024-10-17 12:02:00 +02:00
nrf52833.svd initial commit 2024-10-17 12:02:00 +02:00
README.md clarify how to go on with multiple probes 2024-10-17 13:21:47 +02:00
rust-toolchain.toml initial commit 2024-10-17 12:02:00 +02:00
screenshot.jpg initial commit 2024-10-17 12:02:00 +02:00

Micro-Rust

A sample project for rust and embassy on a micro:bit.

It uses the buttons to cycle through predefined led patterns.

micro:bit with heart pattern

Building

The recommended way is to use nix with nix flakes. It still is not for the faint of heart but worth the investment.

Otherwise, rustup and other tools can be installed manually.

Nix

Install nix and enable nix flakes.

Enter the dev environment with nix develop. From there on the usual rust commands work.

Manual Way

Install rustup, probe-rs and flip-link. When running rust commands (such as cargo build), rustup should pull in the specified toolchain.

Usage

Connect the micro:bit to the computer and verify that it is listed when running probe-rs list (if multiple probes are recognized, add -- --probe <ID> to subsequent cargo run calls <ID> being the relevant probe id).

Using the normal cargo run command, will build the project, flash it onto the microcontroller and run it.

Use the buttons to cycle through the different patterns.

License

Licensed as GPLv3 (apart from nrf52833.svd which is BSD-3-Clause and only used for debugging).