Microbit
A Rust crate for BBC micro:bit development
Install / Use
/learn @nrf-rs/MicrobitREADME
microbit
microbit contains everything required getting started using Rust to create firmwares for the fabulous BBC micro:bit microcontroller board. This little board has everything and a kitchen sink built-in, even a capable debugging interface.
Getting started
All you need to start programming this device is:
- A BBC micro:bit board
- A computer (known to work with macOS, Linux and Windows)
- A bit of open source software
Know your version
The micro:bit comes in different versions. There is a separate crate for each major board version. See the table below to identify which crate you need to use.
| Crate | Board version | Board image | Docs | crates.io | target |
| ------------------------------ | ------------- | ----------- | ---- | --------- | ------ |
| microbit | V1 | <img src="https://github.com/microbit-foundation/microbit-svg/raw/master/microbit-drawing-back-1-5.png" width="124px" height="100px"> | |
|
thumbv6m-none-eabi |
| microbit-v2 | V2 | <img src="https://github.com/microbit-foundation/microbit-svg/raw/master/microbit-drawing-back-2.png" width="124px" height="100px"> | |
|
thumbv7em-none-eabihf |
Install dependencies
The examples make use of some of the fantastic tooling from the knurling and probe-rs projects.
In order to run the examples you need to install probe-rs
and flip-link.
> cargo install probe-rs-tools flip-link
Run an example
The first thing to try is one of the examples in this repository. Plug in your micro:bit and run one of the commands below.
For micro:bit V1
> cargo run --release --manifest-path ./examples/display-blocking/Cargo.toml --features v1 --target thumbv6m-none-eabi
For micro:bit V2
> cargo run --release --manifest-path ./examples/display-blocking/Cargo.toml --features v2 --target thumbv7em-none-eabihf
You should see a lot of build output, the orange LED on the back of the micro:bit should flash quickly, and a message should appear on the LED display.
Congratulations! You've flashed your first Rust program onto your micro:bit!
Further reading
A guide to embedded development with Rust on the micro:bit using this crate can be found in the MicroRust book.
Other useful resources:
- micro:bit developer community
- micro:bit hardware overview
- nrf-hal the hardware abstraction layer (HAL) this repository is based on
License
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
