Module microbit::display::blocking [−][src]
Expand description
Blocking support for the 5x5 LED display.
This module provides a simple blocking interface
to the on board 5x5 LED display. If you need a more sophisticated
or non-blocking interface use the display::nonblocking module.
Example
// take the board
let board = Board::take().unwrap();
// make a timer
let mut timer = hal::Timer::new(board.TIMER0);
// create the Display
let mut display = Display::new(board.display_pins);
// and light up some LEDs
let heart = [
[0, 1, 0, 1, 0],
[1, 0, 1, 0, 1],
[1, 0, 0, 0, 1],
[0, 1, 0, 1, 0],
[0, 0, 1, 0, 0],
];
loop {
display.show(&mut timer, heart, 1000);
display.clear();
timer.delay_ms(250u32);
}For a working example examples/display-blocking
Structs
Blocking interface to the on board LED display