Crate rpi_led_matrix

Source
Expand description

Rust bindings for the C++ library rpi-rgb-led-matrix.

§Example Usage

use rpi_led_matrix::{LedMatrix, LedColor};
let matrix = LedMatrix::new(None, None).unwrap();
let mut canvas = matrix.offscreen_canvas();
for red in (0..255).step_by(16) {
    for green in (0..255).step_by(16) {
        for blue in (0..255).step_by(16) {
            canvas.fill(&LedColor { red, green, blue });
            canvas = matrix.swap(canvas);
        }
    }
}

§Features

§embeddedgraphics (default)

pulls in the embedded-graphics crate and implements DrawTarget so that you can use all of the embedded-graphics abstractions.

§args

Pulls in clap, enabling the args module which adds LED matrix arguments for configuration to your clap::App.

§c-stubs

Passthrough argument to rpi-led-matrix-sys. See their documentation for more info.

Passthrough argument to rpi-led-matrix-sys. See their documentation for more info.

Modules§

  • Provides functions to add arguments to control various parameters of your RGB LED matrix.

Structs§

  • The Rust handle for the matrix canvas to draw on.
  • The Rust handle representing a color you’d like to display.
  • The Rust handle for LedFont.
  • The Rust handle for the RGB matrix.
  • Options related to the LED matrix, like rows/cols/HW mapping
  • Options related to how the runtime operates, like GPIO slowdown or daemon/sudo privileges