GithubHelp home page GithubHelp logo

epd-waveshare's Introduction

Build Status

This library contains a driver for E-Paper Modules from Waveshare (which are basically the same as the Dalian Good Display ones).

It uses the embedded graphics library for the optional graphics support.

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

Other similar libraries with support for much more displays are u8g2 and GxEPD for arduino.

Examples

There are multiple examples in the examples folder. Use cargo run --example example_name to try them.

// Setup the epd
let mut epd = Epd4in2::new( & mut spi, cs, busy, dc, rst, & mut delay) ?;

// Setup the graphics
let mut display = Display4in2::default ();

// Draw some text
display.draw(
let _ = Text::new("Hello Rust!", Point::new(x, y))
.into_styled(text_style!(
            font = Font12x16,
            text_color = Black,
            background_color = White
        ))
.draw(display);
);

// Transfer the frame data to the epd and display it
epd.update_and_display_frame( & mut spi, & display.buffer()) ?;

(Supported) Devices

Device (with Link) Colors Flexible Display Partial Refresh Supported Tested
7.5 Inch B/W HD (A) Black, White
7.5 Inch B/W V2 (A) [1] Black, White
7.5 Inch B/W (A) Black, White
4.2 Inch B/W (A) Black, White Not officially [2]
1.54 Inch B/W (A) Black, White
2.13 Inch B/W (A) V2 Black, White
2.13 Inch B/W/R (B/C) V2 Black, White, Red
2.9 Inch B/W (A) Black, White
2.9 Inch B/W V2 (A) Black, White
1.54 Inch B/W/R (B) Black, White, Red
1.54 Inch B/W/Y (C) Black, White, Yellow
2.9 Inch B/W/R (B/C) Black, White, Red
5.65 Inch 7 Color (F) Black, White, Red, Green, Blue, Yellow, Orange
2.7 Inch 3 Color (B) Black, White, Red

[1]: 7.5 Inch B/W V2 (A)

Since November 2019 Waveshare sells their updated version of these displays. They should have a "V2" marking sticker on the backside of the panel.

Use epd7in5_v2 instead of epd7in5, because the protocol changed.

[2]: 4.2 Inch E-Ink Black/White - Partial Refresh

Out of the Box the original driver from Waveshare only supports full updates.

That means: Be careful with the quick refresh updates:
It's possible with this driver but might lead to ghosting / burn-in effects therefore it's hidden behind a feature.

Interface

Interface Description
VCC 3.3V
GND GND
DIN SPI MOSI
CLK SPI SCK
CS SPI chip select (Low active)
DC Data/Command control pin (High for data, and low for command)
RST External reset pin (Low for reset)
BUSY Busy state output pin (Low for busy)

Display Configs

There are two types of Display Configurations used in Waveshare EPDs, which also needs to be set on the "new" E-Paper Driver HAT. They are also called A and B, but you shouldn't get confused and mix it with the Type A,B,C and D of the various Displays, which just describe different types (colored variants) or new versions. In the Display Config the separation is most likely due to included fast partial refresh of the displays. In a Tabular form:

Type A Type B
1.54in (A) 1.54in (B)
2.13in (A) 1.54in (C)
2.13in (D) 2.13in (B)
2.9in (A) 2.13in (C)
2.7in (A)
2.7in (B)
2.9in (B)
2.9in (C)
4.2in (A)
4.2in (B)
4.2in (C)
7.5in (A)
7.5in (B)
7.5in (C)

epd-waveshare's People

Contributors

andber1 avatar asaaki avatar buggstream avatar caemor avatar crzysdrs avatar david-oconnor avatar dbr avatar dkm avatar icewind1991 avatar jkristell avatar lrbalt avatar michaelbeaumont avatar olback avatar pjsier avatar sirhcel avatar str4d avatar therealprof avatar whiite avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.