Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-led-matrix

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.

Requirements

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!

Basic usage

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;
    }
}

Feature flags

  • defmt: adds defmt::Format support on main types.

Related work and acknowledgements

  • tiny-led-matrix: interrupt-based driver for LED matrices
  • microbit-bsp: embassy-based board support package for the micro:bit v2 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages