Crates.io | epd-waveshare-uart |
lib.rs | epd-waveshare-uart |
version | 0.1.0 |
source | src |
created_at | 2019-12-25 22:09:14.793111 |
updated_at | 2019-12-25 22:09:14.793111 |
description | An embedded-hal based driver for ePaper displays from Waveshare that use UART. Only 4.3 is supported |
homepage | https://github.com/iohe/epd-waveshare-uart |
repository | https://github.com/iohe/epd-waveshare-uart.git |
max_upload_size | |
id | 192386 |
size | 48,887 |
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.
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)?;
Device (with Link) | Colors | Flexible Display | Partial Refresh | Supported | Tested |
---|---|---|---|---|---|
4.3 Inch B/W | Black, White | ✕ | ✕ | ✔ | ✔ |
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) |