adafruit-nrf52840-express

Crates.ioadafruit-nrf52840-express
lib.rsadafruit-nrf52840-express
version0.2.0
sourcesrc
created_at2021-11-16 02:13:51.876063
updated_at2021-11-20 20:20:23.241836
descriptionBoard support crate for Adafruit's nRF52840 Express board
homepage
repositoryhttps://github.com/nnarain/adafruit-nrf52840-bsc
max_upload_size
id482447
size8,613
Natesh Narain (nnarain)

documentation

README

adafruit-nrf52840-bsc

Board support crates for Adafruit's nRF52840 based boards.

Board Info Page crates.io
Sense https://learn.adafruit.com/adafruit-feather-sense sense crate
Express https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather express crate

Simple example:

use adafruit_nrf52840_sense as bsp;

use bsp::{
    entry,
    prelude::*,
    hal::gpio,
    Board,
};

#[entry]
fn main() -> ! {
    let board = Board::new().unwrap();

    let mut delay = board.delay;

    let mut led1 = board.d13.into_push_pull_output(gpio::Level::Low);
    let mut led2 = board.blue_led;

    led2.set_high().unwrap();

    loop {
        led1.set_high().unwrap();
        led2.set_low().unwrap();

        delay.delay_ms(500u16);

        led1.set_low().unwrap();
        led2.set_high().unwrap();

        delay.delay_ms(500u16);
    }
}

Examples

Install cargo-just

cargo install just

Run example specifying both the board and the example name:

just run-example sense serial
Commit count: 65

cargo fmt