So you want to try using Rust embedded, great! To get started, there are a few tools you need to install:
If you don’t have any supported board, don’t worry: you can also run the
std on your PC.
Embassy supports many microcontroller families, but the easiest ways to get started is if you have one of the more common development kits that there are examples for already.
First you need to clone the github repository;
git clone https://github.com/drogue-iot/drogue-device.git cd drogue-device
You can run an example by opening a terminal and entering the following commands:
cd examples/std/pingpong RUST_LOG=info cargo run --release
If you’re using any of the microcontroller examples:
cd examples/nrf52/microbit/jukebox DEFMT_LOG=info cargo run --release
|The DEFMT_LOG environment variable controls the example log verbosity. If not set, you will not see anything logged to the console.|
Found an example you like? Using the examples in tree have all the dependencies set up for you, but which dependencies should you specify when creating your own project? Since drogue-device is still using nightly rust, and still have dependencies that are not released on crates.io, we’ve prepared a mechanism for you to clone an example into its own folder.
To create a project based on one of the microbit examples, run the following command in the toplevel folder of the drogue-device repository:
cargo xtask clone examples/nrf52/microbit/jukebox $HOME/myexample