#display #e-ink #epd #epaper #embedded-hal-driver

no-std epd-waveshare-uart

An embedded-hal based driver for ePaper displays from Waveshare that use UART. Only 4.3 is supported

1 unstable release

0.1.0 Dec 25, 2019

#1390 in Embedded development

ISC license

48KB
1K SLoC

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)

Dependencies

~4MB
~125K SLoC