Skip to content

Commit

Permalink
Version 1.1.5
Browse files Browse the repository at this point in the history
added support for 6" ED060SCT on Waveshare e-Paper IT8951 Driver HAT
  • Loading branch information
ZinggJM committed Mar 25, 2019
1 parent 8fdc13d commit ccc690c
Show file tree
Hide file tree
Showing 10 changed files with 55,793 additions and 5 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,16 @@
- GDEW075T8 7.5" b/w
- GDEW075Z09 7.5" b/w/r
#### Supported SPI e-paper panels & boards from Waveshare: compare with Good Display, same panel
#### other supported panels
- ED060SCT 6" grey levels, on Waveshare e-Paper IT8951 Driver HAT

### Version 1.1.4+
#### Version 1.1.5
- added support for 6" ED060SCT on Waveshare e-Paper IT8951 Driver HAT
- uses 3.3V data lines, but 5V supply (~80mA active, ~20mA stand-by, sleep doesn't work)
- note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work!
- note that the IT8951 Driver HAT is panel specific, with flash parameterized by supplier
- this is an initial version
#### Version 1.1.4+
- added GxEPD2_WS_ESP32_Driver example for Waveshare ESP32 Driver Board
#### Version 1.1.4
- eliminated double refresh for "fast partial update"
Expand Down
37 changes: 36 additions & 1 deletion examples/GxEPD2_Example/GxEPD2_Example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
// can use only quarter buffer size
//GxEPD2_3C < GxEPD2_583c, GxEPD2_583c::HEIGHT / 4 > display(GxEPD2_583c(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4));
//GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT / 4> display(GxEPD2_750c(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4));
// grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
// HRDY -> 4, RST -> 2, CS -> SS(15), SCK -> SCK(14), MOSI -> MOSI(D7(13)), MISO -> MISO(D6(12)), GND -> GND, 5V -> 5V
// note: 5V supply needs to be exact and strong; 5V pin of USB powered Wemos D1 mini doesn't work!
//GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT / 8> display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4));

// ***** for mapping of Waveshare e-Paper ESP8266 Driver Board *****
// select one , can use full buffer size (full HEIGHT)
Expand Down Expand Up @@ -112,6 +116,10 @@
//GxEPD2_3C<GxEPD2_270c, GxEPD2_270c::HEIGHT> display(GxEPD2_270c(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));
//GxEPD2_3C<GxEPD2_420c, GxEPD2_420c::HEIGHT> display(GxEPD2_420c(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));
//GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT> display(GxEPD2_750c(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));
// grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
// HRDY -> 4, RST -> 16, CS -> SS(5), SCK -> SCK(18), MOSI -> MOSI(23), MISO -> MISO(19), GND -> GND, 5V -> 5V
// note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work!
//GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT> display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));
#endif

#if defined(_BOARD_GENERIC_STM32F103C_H_)
Expand Down Expand Up @@ -203,6 +211,9 @@
#include "bitmaps/Bitmaps3c128x296.h" // 2.9" b/w/r
#include "bitmaps/Bitmaps3c176x264.h" // 2.7" b/w/r
#include "bitmaps/Bitmaps3c400x300.h" // 4.2" b/w/r
#if defined(ESP8266) || defined(ESP32)
#include "bitmaps/WS_Bitmaps800x600.h" // 6.0" grey
#endif

#else

Expand All @@ -227,6 +238,7 @@ void setup()
Serial.begin(115200);
Serial.println();
Serial.println("setup");
delay(100);
display.init(115200);
// first update should be full refresh
helloWorld();
Expand Down Expand Up @@ -653,6 +665,9 @@ void drawBitmaps()
#endif
#ifdef _GxBitmaps640x384_H_
drawBitmaps640x384();
#endif
#ifdef _WS_Bitmaps800x600_H_
drawBitmaps800x600();
#endif
// 3-color
#ifdef _GxBitmaps3c104x212_H_
Expand Down Expand Up @@ -909,6 +924,26 @@ void drawBitmaps640x384()
}
#endif

#ifdef _WS_Bitmaps800x600_H_
void drawBitmaps800x600()
{
#if defined(ESP8266) || defined(ESP32)
if (display.epd2.panel == GxEPD2::ED060SCT)
{
// Serial.print("sizeof(WS_zoo_800x600) is "); Serial.println(sizeof(WS_zoo_800x600));
display.drawNative(WS_zoo_800x600, 0, 0, 0, 800, 600, false, false, true);
delay(2000);
// Serial.print("sizeof(WS_pic_1200x825) is "); Serial.println(sizeof(WS_pic_1200x825));
// display.drawNative((const uint8_t*)WS_pic_1200x825, 0, 0, 0, 1200, 825, false, false, true);
// delay(2000);
// Serial.print("sizeof(WS_acaa_1024x731) is "); Serial.println(sizeof(WS_acaa_1024x731));
// display.drawNative(WS_acaa_1024x731, 0, 0, 0, 1024, 731, false, false, true);
// delay(2000);
}
#endif
}
#endif

struct bitmap_pair
{
const unsigned char* black;
Expand Down Expand Up @@ -988,7 +1023,7 @@ void drawBitmaps3c200x200()
display.writeScreenBuffer(); // use default for white
display.writeImage(bitmap_pairs[i].black, bitmap_pairs[i].red, x, y, 200, 200, false, false, true);
display.refresh();
delay(2000);
delay(1000);
x += 40;
y += 40;
if ((x >= int16_t(display.epd2.WIDTH)) || (y >= int16_t(display.epd2.HEIGHT))) break;
Expand Down
4 changes: 4 additions & 0 deletions examples/GxEPD2_Example/GxEPD2_boards_added.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
//GxEPD2_3C<GxEPD2_270c, GxEPD2_270c::HEIGHT> display(GxEPD2_270c(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15));
//GxEPD2_3C<GxEPD2_420c, GxEPD2_420c::HEIGHT> display(GxEPD2_420c(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15));
//GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT> display(GxEPD2_750c(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15));
// grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
// HRDY -> 4, RST -> 16, CS -> SS(5), SCK -> SCK(18), MOSI -> MOSI(23), MISO -> MISO(19), GND -> GND, 5V -> 5V
// note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work!
//GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT> display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15));
#endif

#endif
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GxEPD2
version=1.1.4
version=1.1.5
author=Jean-Marc Zingg
maintainer=Jean-Marc Zingg
sentence=Arduino Display Library for SPI E-Paper displays from Dalian Good Display and Waveshare.
Expand Down
1 change: 1 addition & 0 deletions src/GxEPD2.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class GxEPD2
GDEW042T2, Waveshare_4_2_bw = GDEW042T2,
GDEW0583T7, Waveshare_5_83_bw = GDEW0583T7,
GDEW075T8, Waveshare_7_5_bw = GDEW075T8,
ED060SCT, // on Waveshare IT8951 Driver HAT
// 3-color
GDEW0154Z04, Waveshare_1_54_bwr = GDEW0154Z04,
GDEW0213Z16, Waveshare_2_13_bwr = GDEW0213Z16,
Expand Down
1 change: 1 addition & 0 deletions src/GxEPD2_BW.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "epd/GxEPD2_420.h"
#include "epd/GxEPD2_583.h"
#include "epd/GxEPD2_750.h"
#include "it8951/GxEPD2_it60.h"

#ifndef ENABLE_GxEPD2_GFX
// default is off
Expand Down
4 changes: 2 additions & 2 deletions src/GxEPD2_EPD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void GxEPD2_EPD::_writeData(const uint8_t* data, uint16_t n)
{
SPI.beginTransaction(_spi_settings);
if (_cs >= 0) digitalWrite(_cs, LOW);
for (uint8_t i = 0; i < n; i++)
for (uint16_t i = 0; i < n; i++)
{
SPI.transfer(*data++);
}
Expand All @@ -158,7 +158,7 @@ void GxEPD2_EPD::_writeDataPGM(const uint8_t* data, uint16_t n)
{
SPI.beginTransaction(_spi_settings);
if (_cs >= 0) digitalWrite(_cs, LOW);
for (uint8_t i = 0; i < n; i++)
for (uint16_t i = 0; i < n; i++)
{
SPI.transfer(pgm_read_byte(&*data++));
}
Expand Down
Loading

0 comments on commit ccc690c

Please sign in to comment.