Skip to content

Commit

Permalink
Merge pull request #63 from ZinggJM/work_in_progress
Browse files Browse the repository at this point in the history
Version 1.5.8
  • Loading branch information
ZinggJM authored Jul 14, 2024
2 parents 0b9c314 + 9ff6123 commit e267fa7
Show file tree
Hide file tree
Showing 41 changed files with 31,597 additions and 33 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
- 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
- GDEY029T71H 2.9" b/w 128x384, SSD1685
- GDEY029F51H 2.9" 4-color 168x384, JD79667
- Waveshare3inch4color 3.0" 4-color 168x400
- GDEQ031T10 3.1" b/w 240x320, UC8253
Expand All @@ -119,6 +120,7 @@
- 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
- GDEP0565D90 5.65" 7-color 600x448
- GDEW0583T7 5.83" b/w 600x448, UC8159c (IL0371)
- GDEW0583T8 5.83" b/w 648x480, EK79655 (GD7965)
- GDEW0583Z83 5.83" b/w/r 648x480, EK79655 (GD7965)
Expand All @@ -136,6 +138,7 @@
- GDEM1085T51 10.85 b/w 1360x480, JD79686AB
- GDEH116T91 11.6" b/w 960x640, SSD1677
- GDEY116Z91 11.6" b/w/r 960x640, SSD1677
- GDEY116F51 11.6" 4-color 960x640, SSD2677
- GDEW1248T3 12.48" b/w 1304x984, UC8179
- GDEY1248Z51 12.48" b/w/r 1304x984, UC8179
- GDEM133T91 13.3" b/w 960x680, SSD1677
Expand All @@ -153,7 +156,11 @@
- I can't accept panel donations to add support to GxEPD2 currently, I need a break.
- I can take note of panels of interest for users, to maybe add support later.

### Version 1.5.7
### Version 1.5.8
- added support for GDEP0565D90 5.65" 7-color 600x448
- added support for GDEY116F51 11.6" 4-color 960x640, SSD2677
- added support for GDEY029T71H 2.9" b/w 128x384, SSD1685
#### Version 1.5.7
- added support for GDEY0213F51 2.13" 4-color 122x250, JD79661
- added support for GDEM1085T51 10.85 b/w 1360x480, JD79686AB
#### Version 1.5.6
Expand Down
113 changes: 91 additions & 22 deletions examples/GxEPD2_Example/GxEPD2_Example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include "bitmaps/Bitmaps104x212.h" // 2.13" b/w flexible GDEW0213I5F
#include "bitmaps/Bitmaps128x250.h" // 2.13" b/w
#include "bitmaps/Bitmaps128x296.h" // 2.9" b/w
#include "bitmaps/Bitmaps168x384.h" // 2.9" b/w
#include "bitmaps/Bitmaps152x296.h" // 2.6" b/w
#include "bitmaps/Bitmaps176x264.h" // 2.7" b/w
#include "bitmaps/Bitmaps240x360.h" // 3.1" b/w
Expand Down Expand Up @@ -94,8 +95,10 @@
#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
#include "bitmaps/Bitmaps4c400x300.h" // 4.2" 4-color
#include "bitmaps/Bitmaps4c960x640.h" // 11.6" 4-color
// 7-color
#include "bitmaps/Bitmaps7c600x448.h" // 5.65" 7-color
#include "bitmaps/WS_Bitmaps7c192x143.h" // 5.65" 7-color
#include "bitmaps/WS_Bitmaps7c300x180.h" // 7.3" 7-color
#endif
Expand All @@ -114,6 +117,7 @@
//#include "bitmaps/Bitmaps104x212.h" // 2.13" b/w flexible GDEW0213I5F
//#include "bitmaps/Bitmaps128x250.h" // 2.13" b/w
//#include "bitmaps/Bitmaps128x296.h" // 2.9" b/w
#include "bitmaps/Bitmaps168x384.h" // 2.9" b/w
//#include "bitmaps/Bitmaps176x264.h" // 2.7" b/w
////#include "bitmaps/Bitmaps400x300.h" // 4.2" b/w // not enough code space
////#include "bitmaps/Bitmaps640x384.h" // 7.5" b/w // not enough code space
Expand Down Expand Up @@ -183,6 +187,7 @@ void setup()
Serial.print("pages = "); Serial.print(display.pages()); Serial.print(" page height = "); Serial.println(display.pageHeight());
delay(1000);
}
//display.clearScreen(); return;
// first update should be full refresh
helloWorld();
delay(1000);
Expand All @@ -205,12 +210,13 @@ void setup()
delay(1000);
}
//drawGrid(); return;
//drawCornerTest(); return;
drawBitmaps();
//display.powerOff(); return;
drawGraphics();
//return;
#if !defined(__AVR) // takes too long!
if ((display.epd2.panel == GxEPD2::ACeP565) || (display.epd2.panel == GxEPD2::GDEY073D46) || (display.epd2.panel == GxEPD2::ACeP730))
if ((display.epd2.panel == GxEPD2::ACeP565) || (display.epd2.panel == GxEPD2::GDEY073D46) || (display.epd2.panel == GxEPD2::ACeP730) || (display.epd2.panel == GxEPD2::GDEP0565D90))
{
//draw7colorlines();
//delay(2000);
Expand Down Expand Up @@ -803,6 +809,9 @@ void drawBitmaps()
#ifdef _GxBitmaps128x296_H_
drawBitmaps128x296();
#endif
#ifdef _GxBitmaps168x384_H_
drawBitmaps168x384();
#endif
#ifdef _GxBitmaps152x296_H_
drawBitmaps152x296();
#endif
Expand Down Expand Up @@ -873,16 +882,27 @@ void drawBitmaps()
#if defined(ESP32) && defined(_GxBitmaps3c960x680_H_)
drawBitmaps3c960x680();
#endif
if ((display.epd2.WIDTH >= 200) && (display.epd2.HEIGHT >= 200))
{
// show these after the specific bitmaps
#ifdef _GxBitmaps200x200_H_
drawBitmaps200x200();
#endif
#if defined(ESP32) && defined(_GxBitmaps1360x480_H_)
drawBitmaps1360x480();
#endif
// 3-color
#ifdef _GxBitmaps3c200x200_H_
drawBitmaps3c200x200();
#endif
}
// 4-color
#if defined(_GxBitmaps4c128x250_H_)
drawBitmaps4c128x250();
#endif
#if defined(_WS_Bitmaps4c168x168_H_)
drawBitmaps4c168x168();
#endif
#if defined(_WS_Bitmaps4c168x168_H_)
drawBitmaps4c168x168();
#endif
#if defined(_GxBitmaps4c168x384_H_)
drawBitmaps4c168x384();
#endif
Expand All @@ -892,6 +912,13 @@ void drawBitmaps()
#if defined(_GxBitmaps4c400x300_H_)
drawBitmaps4c400x300();
#endif
#if defined(_GxBitmaps4c960x640_H_)
drawBitmaps4c960x640();
#endif
// 7-color
#if defined(_GxBitmaps7c600x448_H_)
drawBitmaps7c600x448();
#endif
#if defined(_WS_Bitmaps7c192x143_H_)
drawBitmaps7c192x143();
#endif
Expand All @@ -901,20 +928,6 @@ void drawBitmaps()
#if defined(_WS_Bitmaps7c300x180_H_)
drawBitmaps7c300x180();
#endif
if ((display.epd2.WIDTH >= 200) && (display.epd2.HEIGHT >= 200))
{
// show these after the specific bitmaps
#ifdef _GxBitmaps200x200_H_
drawBitmaps200x200();
#endif
#if defined(ESP32) && defined(_GxBitmaps1360x480_H_)
drawBitmaps1360x480();
#endif
// 3-color
#ifdef _GxBitmaps3c200x200_H_
drawBitmaps3c200x200();
#endif
}
#if defined(ESP32) && defined(_GxBitmaps3c1304x984_H_)
drawBitmaps3c1304x984();
#endif
Expand Down Expand Up @@ -1177,6 +1190,39 @@ void drawBitmaps128x296()
}
#endif

#ifdef _GxBitmaps168x384_H_
void drawBitmaps168x384()
{
#if !defined(__AVR)
const unsigned char* bitmaps[] =
{
Bitmap168x384_1, Bitmap168x384_2, Bitmap168x384_3, Bitmap168x384_4, Bitmap168x384_5
};
#else
const unsigned char* bitmaps[] =
{
Bitmap168x384_1
};
#endif
if ((display.epd2.WIDTH == 168) && (display.epd2.HEIGHT == 384) && !display.epd2.hasColor)
{
bool mirrored = display.mirror(true);
for (uint16_t i = 0; i < sizeof(bitmaps) / sizeof(char*); i++)
{
display.firstPage();
do
{
display.fillScreen(GxEPD_WHITE);
display.drawInvertedBitmap(0, 0, bitmaps[i], 168, 384, GxEPD_BLACK);
}
while (display.nextPage());
delay(2000);
}
display.mirror(mirrored);
}
}
#endif

#ifdef _GxBitmaps152x296_H_
void drawBitmaps152x296()
{
Expand Down Expand Up @@ -1932,7 +1978,7 @@ void drawBitmaps4c128x250()
#if defined(_WS_Bitmaps4c168x168_H_)
void drawBitmaps4c168x168()
{
if ((display.epd2.panel == GxEPD2::Waveshare437inch4color) || (display.epd2.panel == GxEPD2::Waveshare3inch4color))
if ((display.epd2.panel == GxEPD2::Waveshare437inch4color) || (display.epd2.panel == GxEPD2::Waveshare3inch4color) || (display.epd2.panel == GxEPD2::GDEY116F51))
{
display.drawNative(WS_Bitmap4c168x168, 0, (display.epd2.WIDTH - 168) / 2, (display.epd2.HEIGHT - 168) / 2, 168, 168, false, false, true);
delay(5000);
Expand Down Expand Up @@ -1984,6 +2030,28 @@ void drawBitmaps4c400x300()
}
#endif

#if defined(_GxBitmaps4c960x640_H_)
void drawBitmaps4c960x640()
{
if (display.epd2.panel == GxEPD2::GDEY116F51)
{
display.drawNative(Bitmap4c960x640, 0, (display.epd2.WIDTH - 960) / 2, (display.epd2.HEIGHT - 640) / 2, 960, 640, true, false, true);
delay(5000);
}
}
#endif

#if defined(_GxBitmaps7c600x448_H_)
void drawBitmaps7c600x448()
{
if (display.epd2.panel == GxEPD2::GDEP0565D90)
{
display.epd2.drawDemoBitmap(Bitmap7c600x448, 0, 0, 0, 600, 448, 1, false, true);
delay(5000);
}
}
#endif

#if defined(_WS_Bitmaps7c192x143_H_)
void drawBitmaps7c192x143()
{
Expand All @@ -1998,7 +2066,7 @@ void drawBitmaps7c192x143()
#if defined(_GxBitmaps7c800x480_H_)
void drawBitmaps7c800x480()
{
if ((display.epd2.panel == GxEPD2::GDEY073D46) || (display.epd2.panel == GxEPD2::ACeP730))
if ((display.epd2.panel == GxEPD2::GDEY073D46) || (display.epd2.panel == GxEPD2::ACeP730)|| (display.epd2.panel == GxEPD2::GDEP0565D90))
{
display.epd2.drawDemoBitmap(Bitmap7c800x480, 0, 0, 0, 800, 480, 0, false, true); // special format
delay(5000);
Expand All @@ -2009,7 +2077,7 @@ void drawBitmaps7c800x480()
#if defined(_WS_Bitmaps7c300x180_H_)
void drawBitmaps7c300x180()
{
if ((display.epd2.panel == GxEPD2::GDEY073D46) || (display.epd2.panel == GxEPD2::ACeP730))
if ((display.epd2.panel == GxEPD2::GDEY073D46) || (display.epd2.panel == GxEPD2::ACeP730) || (display.epd2.panel == GxEPD2::GDEP0565D90))
{
display.drawNative(WS_Bitmap7c300x180, 0, (display.epd2.WIDTH - 300) / 2, (display.epd2.HEIGHT - 180) / 2, 300, 180, false, false, true);
delay(5000);
Expand Down Expand Up @@ -2083,4 +2151,5 @@ void drawGraphics()
display.drawPixel(display.width() * 3 / 4, display.height() / 2 , GxEPD_BLACK);
}
while (display.nextPage());
delay(1000);
}
Loading

0 comments on commit e267fa7

Please sign in to comment.