A set of libraries for the ESP8266 and ESP32 (adapted from Waveshare)
bodmer / epd_libraries Goto Github PK
View Code? Open in Web Editor NEWA set of adapted Arduino libraries for Waveshare ePaper displays for ESP8266 and ESP32
A set of adapted Arduino libraries for Waveshare ePaper displays for ESP8266 and ESP32
Unmodified Setup17_ePaper.h included from User_Setup_Select.h
epdif.h
#define RST_PIN -1 // Connect EPD RST pin to ESP6266 RST
#define DC_PIN 14 //GPIO 14 NodeMCU D5. GPIO 2, pin D4 will NOT work
#define CS_PIN -1 // Defined in sketch in overlap mode as D3 (GPIO 0)
//#define BUSY_PIN 4 // Shared with DC, add 2K2 series resistor
#define BUSY_PIN 255 // No busy pin connected, use delays in sketch
Trying with
\Arduino\libraries\epd1in54b\examples\epd1in54b-overlap\epd1in54b-overlap.ino
And the display just sits there. If I add some debug strings, it appears that the program never returns from the .Init() method. e.g. with this code:
Serial.begin(9600);
Serial.println("Start");
delay(500);
Epd epd;
if (epd.Init() != 0) {
Serial.print("e-Paper init failed");
return;
}
Serial.println("Init");
delay(500);
epd.DisplayFrame(IMAGE_BLACK, IMAGE_RED);
Serial.println("Done");
delay(500);
I see "Start" but never "Init" or "Done"
In file https://github.com/Bodmer/EPD_Libraries/blob/master/epd4in2/epd4in2.cpp
The function SetPartialWindow clips the x and y positions to one byte, which is max 255, like so...
SendData(x & 0xf8); // x should be the multiple of 8, the last 3 bit will always be ignored
SendData(((x & 0xf8) + w - 1) >> 8);
SendData(((x & 0xf8) + w - 1) | 0x07);
SendData(y >> 8);
SendData(y & 0xff);
As the display is 400x300, this needs to be larger. I've changed my version to the following so I can update the entire screen.
SendData(x & 0xfff8); // x should be the multiple of 8, the last 3 bit will always be ignored
SendData(((x & 0xfff8) + w - 1) >> 8);
SendData(((x & 0xfff8) + w - 1) | 0x07);
SendData(y >> 8);
SendData(y & 0xffff);
I discovered this when I was trying to paint a 96x150 block at 288,0
Thank you for useful library.
I have 2.13inch e-Paper HAT (C).
https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT_(C)
This model have Black White & Yellow.
I tried epd2in13b-demo, but i can't see Yellow.
Do you have any solutions?
The DrawLine function in https://github.com/Bodmer/EPD_Libraries/blob/master/epd4in2/epdpaint.cpp
The while loop terminates as soon as the last column or row is reached, without rendering the last column or row. The problem is this line...
while((x0 != x1) && (y0 != y1)) {
If the line approaches 45 degrees, then only one pixel will be lost. However, as the line approaches near horizontal or vertical, a lot of the line is lost. Horizontal and Vertical lines are not rendered at all. Replacing the above line to following fixed it for me...
int xEnd = x1+sx;
int yEnd = y1+sy;
while((x0 != xEnd) && (y0 != yEnd)) {
Black border (frame) appears when 2.9 inch b/w EPD is initialised.
You have a register BORDER_WAVEFORM_CONTROL defined in epd2in9.h, but you do not send any data to it to remove Black border
Will there ever be support for the 2.66 inch EPD black/white/red from Waveshare?
For reference: https://www.waveshare.com/wiki/2.66inch_e-Paper_Module_(B)
Or is there a (easy) way to adept one of the existing sizes from this repository?
Hi,
I was hoping you could help me figure out the following issue:
When I install this library via platformio, with the following platformio.ini:
framework = arduino
lib_deps =
bodmer/TFT_eSPI @ ^2.3.70
https://github.com/Bodmer/EPD_Libraries
It seems to clone a subfolder of this repo. Sadly not the one I need. Do you have any idea what could be wrong?
I'm thinking it probably wants library.json and library.properties file in the root, otherwise it searches for the first folder with c/cpp files
Does anyone know why these two have such a different approach to LUTs -
https://github.com/Bodmer/EPD_Libraries/blob/master/epd4in2/epd4in2.cpp
https://github.com/Bodmer/EPD_Libraries/blob/master/epd2in9/epd2in9.cpp
The former has lut_vcom0, lut_ww (white->white), lut_bw (black->white), etc, whereas the latter has lut_full_update and lut_partial_update.
Does this just mean they have different controllers? Would the latter one have built-in versions of _ww, _bw, etc that we're just not seeing in the code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.