Async driver for small monochrome LED matrices like the one found on the micro:bit.
Features text rendering support with built-in or custom fonts, and flexible Iterator-based animations.
To use this crate, you must have an async runtime (e.g. embassy-executor) and compatible embassy-time driver (e.g. embassy-nrf with time-driver-rtc1).
I'm developing it using a BBC micro:bit V2 and haven't tested other chips / displays; feel free to contribute examples!
use embassy_executor::Spawner;
use embassy_time::{Duration, Timer};
use async_led_matrix::{display::LedMatrix, fonts::pendolino::PendolinoFont};
#[embassy_executor::main]
async fn main(_spawner: Spawner) -> ! {
let rows = [
// pins...
];
let cols = [
// pins...
];
let mut display = LedMatrix::new(rows, cols).with_font(PendolinoFont);
loop {
display
.scroll_text("Hello world!", Duration::from_millis(150))
.await;
Timer::after_secs(1).await;
}
}defmt: addsdefmt::Formatsupport on main types.
tiny-led-matrix: interrupt-based driver for LED matricesmicrobit-bsp: embassy-based board support package for themicro:bitv2 which includes a display driver
This crate is meant to fill the gap for async display drivers when using the BSP is not possible or desired. It also includes features not found in the BSP, such as custom fonts and greyscale images.
It includes a copy of the pendolino font under the MIT license.