microbit-properly
=================
The project folder for the book "The micro:bit, Properly".

1. Open this folder in VS Code.
2. Plug in your micro:bit.
3. In a terminal inside this folder, run one program at a time:

     cargo run --example all-on
     cargo run --example digits
     cargo run --example counter
     cargo run --example arrows
     cargo run --example indicator
     cargo run --example blink
     cargo run --example tone
     cargo run --example scale
     cargo run --example hello-rtt
     cargo run --example hello-serial
     cargo run --example tilt
     cargo run --example temperature
     cargo run --example edge-pin

VS Code setup
-------------
The .vscode folder configures rust-analyzer for the micro:bit target and hides
Cargo's generated target folder from the Explorer. It does not change the
project's Cargo configuration.

Use Ctrl+Shift+B to check all examples without flashing the board. To flash an
example, open the Command Palette, choose "Tasks: Run Task", then choose
"micro:bit: flash example" and select an example. This task uses the probe-rs
runner configured in .cargo/config.toml.

Before building, install the Rust target:

     rustup target add thumbv7em-none-eabihf

Before flashing, install probe-rs tools:

     cargo install probe-rs-tools --locked

VS Code will recommend rust-analyzer and Even Better TOML.

The first run downloads and builds the libraries and takes about a minute.
Press Ctrl+C to stop watching. The program keeps running on the board.

Every program passed the Rust type-checker against the real micro:bit v2
libraries. None was run on the board by the author, so the first run on your
board is the real test. If something fails, copy the first "error" block and
send it back.
