Skip to content

Commit

Permalink
Version 3.0.9
Browse files Browse the repository at this point in the history
- fixed BMP handling, e.g. for BMPs created by ImageMagick
- see also Arduino Forum Topic https://forum.arduino.cc/index.php?topic=642343.0
- added support for GDEW075T7 7.5" b/w 800x480
- GDEW075T7 has differential update (1.6s) using a charge balancing waveform
- added "fast partial update" (differential update) for GDEW0371W7 3.7" b/w 240x416
- improved differential update waveform for GDEW026T0 2.6" b/w 152x256
- fixed init code & improved differential update for GDEW042T2 4.2" b/w 300x400
- note that all differential refresh waveforms are a compromise (ghosting, big font use)
- parameters for differential waveform for these display can easily be changed for experimenting
- GDEW042T2 would have greyed background without sustain phase
- GDEW042T2 needs multiple full refreshes after extended use of partial updates
  • Loading branch information
ZinggJM committed Nov 3, 2019
1 parent 10187e3 commit b9dbbc7
Show file tree
Hide file tree
Showing 16 changed files with 13,383 additions and 216 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ A simple E-Paper display library with common base class and separate IO class fo

### The E-Paper display base class is a subclass of Adafruit_GFX, to have graphics and text rendering.

- It needs up to 30kB available RAM to buffer the black/white image for the SPI displays, double for 3-color.
- ESP8266, ESP32 , STM32 systems, Arduino Due e.g. have enough free RAM for full graphics buffer.
- Paged Drawing is available to cope with RAM restriction on AVR processors.
- It needs up to 15kB available RAM to buffer the black/white image for the SPI displays,
- double for 3-color, for e-papers up to 4.2" (300 * 400 / 8, 2 * 300 * 400 / 8).
- ESP8266, ESP32 , STM32 systems, Arduino Due e.g. have enough free RAM for full graphics buffer.
- It needs more RAM for e-paper displays above the 4.2".
- Paged Drawing is available to cope with RAM restriction on AVR processors or for big displays.

### Supporting Arduino Forum Topics:

Expand All @@ -52,6 +54,7 @@ A simple E-Paper display library with common base class and separate IO class fo
- GDEW042Z15 4.2" b/w/r
- GDEW0583T7 5.83" b/w
- GDEW075T8 7.5" b/w
- GDEW075T7 7.5" b/w 800x480
- GDEW075Z09 7.5" b/w/r
- GDEW075Z08 7.5" b/w/r 800x480
#### Supported SPI e-paper panels & boards from Waveshare: compare with Good Display, same panel
Expand All @@ -62,7 +65,19 @@ A simple E-Paper display library with common base class and separate IO class fo

### for pin mapping suggestions see ConnectingHardware.md

### Version 3.0.8
### Version 3.0.9
- fixed BMP handling, e.g. for BMPs created by ImageMagick
- see also Arduino Forum Topic https://forum.arduino.cc/index.php?topic=642343.0
- added support for GDEW075T7 7.5" b/w 800x480
- GDEW075T7 has differential update (1.6s) using a charge balancing waveform
- added "fast partial update" (differential update) for GDEW0371W7 3.7" b/w 240x416
- improved differential update waveform for GDEW026T0 2.6" b/w 152x256
- fixed init code & improved differential update for GDEW042T2 4.2" b/w 300x400
- note that all differential refresh waveforms are a compromise (ghosting, big font use)
- parameters for differential waveform for these display can easily be changed for experimenting
- GDEW042T2 would have greyed background without sustain phase
- GDEW042T2 needs multiple full refreshes after extended use of partial updates
#### Version 3.0.8
- added support for GDEH0213B73 2.13" b/w, replacement for GDE0213B1, GDEH0213B72
- added support for GDEW026T0 2.6" b/w 152x256
- added support for GDEW0371W7 3.7" b/w 240x416
Expand Down
29 changes: 27 additions & 2 deletions examples/GxEPD_Example/GxEPD_Example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h> // 3.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h> // 3.7" b/w
//#include <GxGDEW042T2/GxGDEW042T2.h> // 4.2" b/w
//#include <GxGDEW042Z15/GxGDEW042Z15.h> // 4.2" b/w/r
//#include <GxGDEW0583T7/GxGDEW0583T7.h> // 5.83" b/w
//#include <GxGDEW075T8/GxGDEW075T8.h> // 7.5" b/w
//#include <GxGDEW075T7/GxGDEW075T7.h> // 7.5" b/w 800x480
//#include <GxGDEW075Z09/GxGDEW075Z09.h> // 7.5" b/w/r
//#include <GxGDEW075Z08/GxGDEW075Z08.h> // 7.5" b/w/r 800x480

Expand All @@ -85,6 +86,9 @@ GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary select
GxEPD_Class display(io, /*RST=D4*/ 2, /*BUSY=D2*/ 4); // default selection of D4(=2), D2(=4)
// Heltec E-Paper 1.54" b/w without RST, BUSY
//GxEPD_Class display(io, /*RST=D4*/ -1, /*BUSY=D2*/ -1); // no RST, no BUSY
// Waveshare e-Paper ESP8266 Driver Board
//GxIO_Class io(SPI, 15, 4, 5);
//GxEPD_Class display(io, 5, 16);

#elif defined(ESP32)

Expand Down Expand Up @@ -450,7 +454,7 @@ void showBitmapExample()
void showBitmapExample()
{
#if defined(__AVR)
//display.drawBitmap(BitmapExample1, sizeof(BitmapExample1));
display.drawBitmap(BitmapExample1, sizeof(BitmapExample1));
#else
display.drawExampleBitmap(BitmapExample1, sizeof(BitmapExample1));
delay(2000);
Expand Down Expand Up @@ -539,6 +543,27 @@ void showBitmapExample()
}
#endif

#if defined(_GxGDEW075T7_H_)
void showBitmapExample()
{
#if defined(__AVR)
display.drawExampleBitmap(BitmapExample1, sizeof(BitmapExample1));
#else
display.drawExampleBitmap(BitmapExample1, sizeof(BitmapExample1));
delay(2000);
display.drawExampleBitmap(BitmapExample2, sizeof(BitmapExample2));
delay(5000);
display.drawExampleBitmap(BitmapExample3, sizeof(BitmapExample1));
delay(2000);
display.drawExampleBitmap(BitmapExample4, sizeof(BitmapExample2));
delay(5000);
display.fillScreen(GxEPD_WHITE);
display.drawExampleBitmap(BitmapExample1, 0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, GxEPD_BLACK);
display.update();
#endif
}
#endif

#if defined(_GxGDEW075Z08_H_)
#define HAS_RED_COLOR
void showBitmapExample()
Expand Down
16 changes: 11 additions & 5 deletions examples/GxEPD_SD_Example/GxEPD_SD_Example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,28 @@ SdFat SD;
#include <GxEPD.h>

// select the display class to use, only one
#include <GxGDEP015OC1/GxGDEP015OC1.h> // 1.54" b/w
//#include <GxGDEP015OC1/GxGDEP015OC1.h> // 1.54" b/w
//#include <GxGDEW0154Z04/GxGDEW0154Z04.h> // 1.54" b/w/r 200x200
//#include <GxGDEW0154Z17/GxGDEW0154Z17.h> // 1.54" b/w/r 152x152
//#include <GxGDEW0213I5F/GxGDEW0213I5F.h> // 2.13" b/w 104x212 flexible
//#include <GxGDE0213B1/GxGDE0213B1.h> // 2.13" b/w
//#include <GxGDEH0213B72/GxGDEH0213B72.h> // 2.13" b/w new panel
//#include <GxGDEH0213B73/GxGDEH0213B73.h> // 2.13" b/w newer panel
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h> // 3.7" b/w
//#include <GxGDEW042T2/GxGDEW042T2.h> // 4.2" b/w
//#include <GxGDEW042Z15/GxGDEW042Z15.h> // 4.2" b/w/r
//#include <GxGDEW0583T7/GxGDEW0583T7.h> // 5.83" b/w
//#include <GxGDEW075T8/GxGDEW075T8.h> // 7.5" b/w
//#include <GxGDEW075T7/GxGDEW075T7.h> // 7.5" b/w 800x480
//#include <GxGDEW075Z09/GxGDEW075Z09.h> // 7.5" b/w/r
//#include <GxGDEW075Z08/GxGDEW075Z08.h> // 7.5" b/w/r 800x480

#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>
Expand Down Expand Up @@ -330,7 +338,8 @@ void drawBitmapFrom_SD_ToBuffer(const char *filename, int16_t x, int16_t y, bool
if (depth <= 8)
{
if (depth < 8) bitmask >>= depth;
file.seekSet(54); //palette is always @ 54
//file.seekSet(54); //palette is always @ 54
file.seekSet(imageOffset - (4 << depth)); // 54 for regular, diff for colorsimportant
for (uint16_t pn = 0; pn < (1 << depth); pn++)
{
blue = file.read();
Expand Down Expand Up @@ -488,6 +497,3 @@ uint32_t read32(SdFile& f)
((uint8_t *)&result)[3] = f.read(); // MSB
return result;
}



11 changes: 9 additions & 2 deletions examples/GxEPD_WiFi_Example/GxEPD_WiFi_Example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,22 @@
//#include <GxGDEW0213I5F/GxGDEW0213I5F.h> // 2.13" b/w 104x212 flexible
//#include <GxGDE0213B1/GxGDE0213B1.h> // 2.13" b/w
//#include <GxGDEH0213B72/GxGDEH0213B72.h> // 2.13" b/w new panel
//#include <GxGDEH0213B73/GxGDEH0213B73.h> // 2.13" b/w newer panel
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h> // 3.7" b/w
//#include <GxGDEW042T2/GxGDEW042T2.h> // 4.2" b/w
//#include <GxGDEW042Z15/GxGDEW042Z15.h> // 4.2" b/w/r
//#include <GxGDEW0583T7/GxGDEW0583T7.h> // 5.83" b/w
//#include <GxGDEW075T8/GxGDEW075T8.h> // 7.5" b/w
//#include <GxGDEW075T7/GxGDEW075T7.h> // 7.5" b/w 800x480
//#include <GxGDEW075Z09/GxGDEW075Z09.h> // 7.5" b/w/r
//#include <GxGDEW075Z08/GxGDEW075Z08.h> // 7.5" b/w/r 800x480

#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>
Expand Down Expand Up @@ -327,7 +332,8 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
if (depth <= 8)
{
if (depth < 8) bitmask >>= depth;
bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
//bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
for (uint16_t pn = 0; pn < (1 << depth); pn++)
{
blue = client.read();
Expand Down Expand Up @@ -569,7 +575,8 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
if (depth <= 8)
{
if (depth < 8) bitmask >>= depth;
bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
//bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
for (uint16_t pn = 0; pn < (1 << depth); pn++)
{
blue = client.read();
Expand Down
3 changes: 2 additions & 1 deletion examples/PartialUpdateExample/PartialUpdateExample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h> // 3.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h> // 3.7" b/w
//#include <GxGDEW042T2/GxGDEW042T2.h> // 4.2" b/w
//#include <GxGDEW075T7/GxGDEW075T7.h> // 7.5" b/w 800x480
// these displays do not fully support partial update
//#include <GxGDEW0154Z17/GxGDEW0154Z17.h> // 1.54" b/w/r 152x152
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GxEPD
version=3.0.8
version=3.0.9
author=Jean-Marc Zingg
maintainer=Jean-Marc Zingg
sentence=Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
Expand Down
Loading

0 comments on commit b9dbbc7

Please sign in to comment.