epd-waveshare-uart

Crates.ioepd-waveshare-uart
lib.rsepd-waveshare-uart
version0.1.0
sourcesrc
created_at2019-12-25 22:09:14.793111
updated_at2019-12-25 22:09:14.793111
descriptionAn embedded-hal based driver for ePaper displays from Waveshare that use UART. Only 4.3 is supported
homepagehttps://github.com/iohe/epd-waveshare-uart
repositoryhttps://github.com/iohe/epd-waveshare-uart.git
max_upload_size
id192386
size48,887
Ioan Herisanu (iohe)

documentation

https://docs.rs/epd-waveshare-uart

README

Build Status

This library contains a driver for E-Paper Modules from Waveshare that use UART protocol. So far only 4in3 (800x600) is supported.

A 2018-edition compatible version (Rust 1.31+) is needed.

Other similiar libraries with support for much more displays are epd-waveshare, u8g2 and GxEPD for arduino.

Examples

There are multiple examples in the examples folder. For more infos about the examples see the seperate Readme there. These examples are all rust projects of their own, so you need to go inside the project to execute it (cargo run --example doesn't work).

// Setup the epd
let mut epd = EPD4in3::new(&mut serial, wake, rst, &mut delay)?;

// Setup the graphics
let mut buffer = Buffer4in3::default();
let mut display = Display::new(epd.width(), epd.height(), &mut buffer.buffer);

// Draw some text
display.draw(
    Font12x16::render_str("Hello Rust!")
        .stroke(Some(EpdColor::Black))
        .fill(Some(EpdColor::White))
        .translate(Point::new(5, 50))
        .into_iter(),
);

// Transfer the frame data to the epd
epd.update_frame(&mut serial, &display.buffer(), delay)?;

// Display the frame on the epd
epd.display_frame(&mut serial)?;

(Supported) Devices

Device (with Link) Colors Flexible Display Partial Refresh Supported Tested
4.3 Inch B/W Black, White

Interface

Interface Description
VCC 5.0V
GND GND
DOUT Serial data out
DIN Serial data in
WAKE_UP External wake up
RST External reset pin (Low for reset)
Commit count: 4

cargo fmt