Skip to content

Unofficial rust implementation of the waveshare e-paper driver.

License

Notifications You must be signed in to change notification settings

azureqaq/waveshare-epd-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

waveshare-epd-rs

Unofficial rust implementation of the waveshare e-paper driver.

Currently, only epd5in79 is supported. We welcome issues and pull requests!

How to use

Add dependencies

# Cargo.toml
[dependencies]
waveshare_epd = { git = "https://github.com/azureqaq/waveshare-epd-rs.git", features = [
    "epd5in79",
] }

Import crate and use it

use waveshare_epd::epd5in79::Epd5in79Impl;
use embedded_graphics::draw_target::DrawTarget;

fn main() {
    let mut epd_impl = Epd5in79Impl::default();
    // As `BinaryColor` driver.
    let mut epd_bin = epd_impl.as_binary();
    // Use `embedded_graphics` to draw some pixels...
    epd_bin.display_binary_fast().unwrap();
    drop(epd_bin);
    
    // As `Gray2` driver.
    let mut epd_gray = epd_impl.as_gray2();
    // Draw some pixels...
    epd_gray.display_gray2().unwrap();

    // When `epd_impl` goes out of scope, it will automatically enter deep sleep mode.
}

About

Unofficial rust implementation of the waveshare e-paper driver.

Topics

Resources

License

Stars

Watchers

Forks

Languages