Skip to content

Commit

Permalink
Version 1.5.3
Browse files Browse the repository at this point in the history
- added support for GDEQ0426T82 4.26" b/w 800x480
- added support for GDEY0266F51H 2.66" 4-color 184x460
- added support for GDEY029F51H 2.9" 4-color 168x384
- added support for GDEY0420F51 4.2" 4-color 400x300
- added support for Waveshare 3.00" 4-color e-paper display 168x400
- updated support for Waveshare 4.37" 4-color e-paper display 512x368
- the 4-color displays have partial window addressing and refresh
- renamed GDEY042T91 to its new official name GDEY042T81
  • Loading branch information
ZinggJM committed Nov 7, 2023
1 parent 260ffc6 commit 17cf7f4
Show file tree
Hide file tree
Showing 78 changed files with 11,692 additions and 418 deletions.
61 changes: 52 additions & 9 deletions ConnectingHardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,75 @@

#### mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini
- BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V

#### mapping suggestion from Waveshare SPI e-Paper to ESP8266 NodeMCU:
- BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V
- NOTE: connect 3.3k pull-down from D8 to GND if your board or shield has level converters
- NOTE for ESP8266: using SS (GPIO15) for CS may cause boot mode problems, use different pin in case, or 3.3k pull-down
- NOTE: connect 1k pull-up from D4 (RST) to 3.3V if your board or shield has the "clever" reset circuit, or use a different pin

#### mapping suggestion from Waveshare SPI e-Paper to generic ESP8266
- BUSY -> GPIO4, RST -> GPIO2, DC -> GPIO0, CS -> GPIO15, CLK -> GPIO14, DIN -> GPIO13, GND -> GND, 3.3V -> 3.3V
- NOTE: connect 3.3k pull-down from GPIO15 to GND if your board or shield has level converters
- NOTE for ESP8266: using SS (GPIO15) for CS may cause boot mode problems, use different pin in case, or 3.3k pull-down
- NOTE: connect 1k pull-up from GPIO2 (RST) to 3.3V if your board or shield has the "clever" reset circuit, or use a different pin

#### mapping suggestion (by G6EJD) from Waveshare SPI e-Paper to ESP8266 Huzzah:
- BUSY -> 03, RST -> 15, DC -> 02, CS -> 00, CLK -> 14, DIN -> 13, GND -> GND, 3.3V -> 3.3V
#### mapping of Waveshare e-Paper ESP8266 Driver Board, new version
- BUSY -> GPIO5, RST -> GPIO2, DC -> GPIO4, CS -> GPIO15, CLK -> GPIO14, DIN -> GPIO13, GND -> GND, 3.3V -> 3.3V
- NOTE for ESP8266: using SS (GPIO15) for CS may cause boot mode problems, add a 3.3k pull-down in case
- the e-Paper ESP8266 Driver Board should have no boot mode issue, as it doesn't use level converters

#### mapping of Waveshare e-Paper ESP8266 Driver Board, old version
- BUSY -> GPIO16, RST -> GPIO5, DC -> GPIO4, CS -> GPIO15, CLK -> GPIO14, DIN -> GPIO13, GND -> GND, 3.3V -> 3.3V
- NOTE for ESP8266: using SS (GPIO15) for CS may cause boot mode problems, add a 3.3k pull-down in case
- the e-Paper ESP8266 Driver Board should have no boot mode issue, as it doesn't use level converters

#### mapping suggestion for ESP32, e.g. LOLIN32, see .../variants/.../pins_arduino.h for your board
- NOTE: there are variants with different pins for SPI ! CHECK SPI PINS OF YOUR BOARD
- BUSY -> 4, RST -> 16, DC -> 17, CS -> SS(5), CLK -> SCK(18), DIN -> MOSI(23), GND -> GND, 3.3V -> 3.3V

#### mapping suggestion for STM32F1, e.g. STM32F103C8T6 "BluePill"
#### mapping of Waveshare ESP32 Driver Board
- BUSY -> 25, RST -> 26, DC -> 27, CS-> 15, CLK -> 13, DIN -> 14
- NOTE: this board uses "unusual" SPI pins and requires re-mapping of HW SPI to these pins in SPIClass
- see example GxEPD2_WS_ESP32_Driver.ino, it shows how this can be done easily

#### mapping suggestion for ESP32, e.g. LOLIN32 D32 PRO
- BUSY -> 15, RST -> 2, DC -> 0, CS -> 5, CLK -> SCK(18), DIN -> MOSI(23), GND -> GND, 3.3V -> 3.3V
- note: use explicit value for CS, as SS is re-defined to TF_CS(4) in pins_arduino.h for Board: "LOLIN D32 PRO"

#### mapping suggestion for ESP32, e.g. TTGO T8 ESP32-WROVER
- BUSY -> 4, RST -> 0, DC -> 2, CS -> SS(5), CLK -> SCK(18), DIN -> MOSI(23), GND -> GND, 3.3V -> 3.3V
- for use with Board: "ESP32 Dev Module":

#### new mapping suggestion for STM32F1, e.g. STM32F103C8T6 "BluePill"
- BUSY -> A1, RST -> A2, DC -> A3, CS-> A4, CLK -> A5, DIN -> A7

#### mapping suggestion for AVR, UNO, NANO etc.
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 10, CLK -> 13, DIN -> 11

#### mapping suggestion for AVR, Arduino Micro, Leonardo
- note: on Leonardo board HW SPI pins are on 6-pin ICSP header
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 10, CLK -> 15, DIN -> 16

#### mapping of Waveshare Universal e-Paper Raw Panel Driver Shield for Arduino / NUCLEO
- BUSY -> 7, RST -> 8, DC -> 9, CS-> 10, CLK -> 13, DIN -> 11

#### mapping suggestion for Arduino MEGA
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 53, CLK -> 52, DIN -> 51

#### mapping suggestion for Arduino DUE
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 77, CLK -> 76, DIN -> 75
- SPI pins are on 6 pin 2x3 SPI header
#### mapping suggestion for Arduino DUE, note: pin 77 is on board pin 10, SS is 10
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 10, CLK -> 76, DIN -> 75
- SPI pins are on 6 pin 2x3 SPI header, no SS on SPI header!

#### mapping suggestion for Arduino MKR1000 or MKRZERO
- note: can't use SS on MKR1000: is defined as 24, should be 4
- BUSY -> 5, RST -> 6, DC -> 7, CS-> 4, CLK -> 9, DIN -> 8

#### mapping suggestion for Arduino Nano RP2040 Connect (Arduino MBED OS Nano Boards)
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 10, CLK -> 13, DIN -> 11

#### mapping suggestion for Raspberry Pi Pico RP2040 (Arduino MBED OS RP2040 Boards)
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 5, CLK -> 18, DIN -> 19

#### mapping of my proto board for Raspberry Pi Pico RP2040 (previous default SPI pins)
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 5, CLK -> 2, DIN -> 3

## connection scheme for (discontinued) DESTM32-S2 connection board for e-paper panels:

Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

- Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0
- Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0
- Note that these topics are closed. Use only for reference.
- create a new topic for each question or issue in https://forum.arduino.cc/c/using-arduino/displays/23

### Note on documentation
- GxEPD2 uses Adafruit_GFX for Graphics and Text support, which is well documented there
Expand Down Expand Up @@ -78,6 +80,7 @@
- GDEW026M01 2.6" b/w 152x296, UC8151 (IL0373), DES
- DEPG0266BN 2.66" b/w 152x296, SSD1680, e.g. LILYGO® TTGO T5 2.66 inch
- GDEY0266Z90 2.66" b/w/r 152x296, SSD1680
- GDEY0266F51H 2.66" 4-color 184x460, JD79667
- GDEW027C44 2.7" b/w/r 176x264, IL91874
- GDEW027W3 2.7" b/w 176x264, EK79652 (IL91874)
- GDEY027T91 2.7" b/w 176x264, SSD1680
Expand All @@ -92,13 +95,17 @@
- GDEM029C90 2.9" b/w/y 128x296, SSD1680
- DEPG0290BS 2.9" b/w 128x296, SSD1680, e.g. LILYGO® TTGO T5 V2.4.1 2.9"
- GDEY029T94 2.9" b/w 128x296, SSD1680
- GDEY029F51H 2.9" 4-color 168x384, JD79667
- Waveshare3inch4color 3.0" 4-color 168x400
- ED037TC1 3.7" b/w 280x480, SSD1677, Waveshare 3.7"
- GDEW0371W7 3.7" b/w 240x416, UC8171 (IL0324)
- GDEW042T2 4.2" b/w 400x300, UC8176 (IL0398)
- GDEW042M01 4.2" b/w 400x300, UC8176 (IL0398), DES
- GDEW042Z15 4.2" b/w/r 400x300, UC8176 (IL0398)
- GDEQ042Z21 4.2" b/w/r 400x300, UC8276, (Waveshare V2)
- GDEY042T91 4.2" b/w 400x300, SSD1683
- GDEY042T81 4.2" b/w 400x300, SSD1683
- GDEY0420F51 4.2" 4-color 400x300, HX8717
- GDEQ0426T82 4.26" b/w 800x480, SSD1677
- Waveshare437inch4color Waveshare 4.37" 4-color e-paper display 512x368
- ACeP565 5.65" Waveshare 5.65" 7-color e-paper display 600x448
- GDEW0583T7 5.83" b/w 600x448, UC8159c (IL0371)
Expand Down Expand Up @@ -126,7 +133,16 @@
- promotion panels from suppliers are welcome, to add support to GxEPD2
- donation panels from users are welcome, to add support to GxEPD2

### Version 1.5.2
### Version 1.5.3
- added support for GDEQ0426T82 4.26" b/w 800x480
- added support for GDEY0266F51H 2.66" 4-color 184x460
- added support for GDEY029F51H 2.9" 4-color 168x384
- added support for GDEY0420F51 4.2" 4-color 400x300
- added support for Waveshare 3.00" 4-color e-paper display 168x400
- updated support for Waveshare 4.37" 4-color e-paper display 512x368
- the 4-color displays have partial window addressing and refresh
- renamed GDEY042T91 to its new official name GDEY042T81
#### Version 1.5.2
- added support for Waveshare 4.37" 4-color e-paper display 512x368
- fixed __has_include test (for packages that don't support __has_include)
- added WIDTH_VISIBLE for correct graphics width for 2.13" b/w 122x250
Expand Down
111 changes: 109 additions & 2 deletions examples/GxEPD2_Example/GxEPD2_Example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@
#include "bitmaps/Bitmaps3c800x480.h" // 7.5" b/w/r
#include "bitmaps/Bitmaps3c880x528.h" // 7.5" b/w/r
#include "bitmaps/WS_Bitmaps800x600.h" // 6.0" grey
// 4-color
#include "bitmaps/Bitmaps4c184x360.h" // 2.66" 4-color
#include "bitmaps/Bitmaps4c168x384.h" // 2.9" 4-color
#include "bitmaps/WS_Bitmaps4c168x168.h" // 4.37" 4-color
#include "bitmaps/WS_Bitmaps4c168x400.h" // 3.00" 4-color
#include "bitmaps/Bitmaps4c400x300.h" // 4.2"" 4-color
// 7-color
#include "bitmaps/WS_Bitmaps7c192x143.h" // 5.65" 7-color
//#include "bitmaps/WS_Bitmaps7c300x180.h" // 7.3" 7-color
#endif
Expand Down Expand Up @@ -142,6 +148,12 @@ void setup()
//display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
//display.init(115200, true, 10, false, SPI0, SPISettings(4000000, MSBFIRST, SPI_MODE0)); // extended init method with SPI channel and/or settings selection
if (display.pages() > 1)
{
delay(100);
Serial.print("pages = "); Serial.print(display.pages()); Serial.print(" page height = "); Serial.println(display.pageHeight());
delay(1000);
}
// first update should be full refresh
helloWorld();
delay(1000);
Expand All @@ -163,6 +175,7 @@ void setup()
showFont("glcdfont", 0);
delay(1000);
}
//drawGrid(); return;
drawBitmaps();
drawGraphics();
//return;
Expand Down Expand Up @@ -190,6 +203,7 @@ void setup()
display.powerOff();
#endif
Serial.println("setup done");
display.end();
}

void loop()
Expand Down Expand Up @@ -701,6 +715,43 @@ void showPartialUpdate()
}
}

void drawGrid()
{
uint16_t x, y;
display.firstPage();
do
{
x = 0;
do
{
display.drawLine(x, 0, x, display.height() - 1, GxEPD_BLACK);
x += 10;
}
while (x < display.width());
y = 0;
do
{
display.drawLine(0, y, display.width() - 1, y, GxEPD_BLACK);
y += 10;
}
while (y < display.height());
x = 0;
do
{
display.fillCircle(x, display.height() / 2, 3, GxEPD_BLACK);
x += 50;
}
while (x <= display.width());
y = 0;
do
{
display.fillCircle(display.width() / 2, y, 3, GxEPD_BLACK);
y += 50;
}
while (y <= display.height());
}
while (display.nextPage());
}

void drawBitmaps()
{
Expand Down Expand Up @@ -778,6 +829,18 @@ void drawBitmaps()
#if defined(_WS_Bitmaps4c168x168_H_)
drawBitmaps4c168x168();
#endif
#if defined(_WS_Bitmaps4c168x168_H_)
drawBitmaps4c168x168();
#endif
#if defined(_GxBitmaps4c168x384_H_)
drawBitmaps4c168x384();
#endif
#if defined(_GxBitmaps4c184x360_H_)
drawBitmaps4c184x360();
#endif
#if defined(_GxBitmaps4c400x300_H_)
drawBitmaps4c400x300();
#endif
#if defined(_WS_Bitmaps7c192x143_H_)
drawBitmaps7c192x143();
#endif
Expand Down Expand Up @@ -1693,14 +1756,58 @@ void drawBitmaps3c1304x984()
#if defined(_WS_Bitmaps4c168x168_H_)
void drawBitmaps4c168x168()
{
if (display.epd2.panel == GxEPD2::Waveshare437inch4color)
if ((display.epd2.panel == GxEPD2::Waveshare437inch4color) || (display.epd2.panel == GxEPD2::Waveshare3inch4color))
{
display.drawNative(WS_Bitmap4c168x168, 0, (display.epd2.WIDTH - 168) / 2, (display.epd2.HEIGHT - 168) / 2, 168, 168, false, false, true);
delay(5000);
}
}
#endif

#if defined(_WS_Bitmaps4c168x400_H_)
void drawBitmaps4c168x400()
{
if (display.epd2.panel == GxEPD2::Waveshare3inch4color)
{
display.drawNative(WS_Bitmap4c168x400, 0, (display.epd2.WIDTH - 168) / 2, (display.epd2.HEIGHT - 400) / 2, 168, 400, false, false, true);
delay(5000);
}
}
#endif

#if defined(_GxBitmaps4c168x384_H_)
void drawBitmaps4c168x384()
{
if (display.epd2.panel == GxEPD2::GDEY029F51H)
{
display.drawNative(Bitmap4c168x384, 0, (display.epd2.WIDTH - 168) / 2, (display.epd2.HEIGHT - 384) / 2, 168, 384, false, false, true);
delay(5000);
}
}
#endif

#if defined(_GxBitmaps4c184x360_H_)
void drawBitmaps4c184x360()
{
if (display.epd2.panel == GxEPD2::GDEY0266F51H)
{
display.drawNative(Bitmap4c184x360, 0, (display.epd2.WIDTH - 184) / 2, (display.epd2.HEIGHT - 360) / 2, 184, 360, false, false, true);
delay(5000);
}
}
#endif

#if defined(_GxBitmaps4c400x300_H_)
void drawBitmaps4c400x300()
{
if (display.epd2.panel == GxEPD2::GDEY0420F51)
{
display.drawNative(Bitmap4c400x300, 0, (display.epd2.WIDTH - 400) / 2, (display.epd2.HEIGHT - 300) / 2, 400, 300, false, false, true);
delay(5000);
}
}
#endif

#if defined(_WS_Bitmaps7c192x143_H_)
void drawBitmaps7c192x143()
{
Expand Down Expand Up @@ -1794,7 +1901,7 @@ void drawGraphics()
{
display.drawRect(display.width() / 8, display.height() / 8, display.width() * 3 / 4, display.height() * 3 / 4, GxEPD_BLACK);
display.drawLine(display.width() / 8, display.height() / 8, display.width() * 7 / 8, display.height() * 7 / 8, GxEPD_BLACK);
display.drawLine(display.width() / 8, display.height() * 7 / 8, display.width() *7 / 8, display.height() / 8, GxEPD_BLACK);
display.drawLine(display.width() / 8, display.height() * 7 / 8, display.width() * 7 / 8, display.height() / 8, GxEPD_BLACK);
display.drawCircle(display.width() / 2, display.height() / 2, display.height() / 4, GxEPD_BLACK);
display.drawPixel(display.width() / 4, display.height() / 2 , GxEPD_BLACK);
display.drawPixel(display.width() * 3 / 4, display.height() / 2 , GxEPD_BLACK);
Expand Down
Loading

0 comments on commit 17cf7f4

Please sign in to comment.