Skip to content

Commit 3e80e90

Browse files
committed
Version 3.1.1
- added support for GDEM029T94 2.9" b/w, actual Waveshare 2.9" b/w - updated example GxEPD_WiFi_Example, for actual GitHub certificate
1 parent 39621c2 commit 3e80e90

File tree

12 files changed

+1699
-28
lines changed

12 files changed

+1699
-28
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ A simple E-Paper display library with common base class and separate IO class fo
4646
- GDEW0213Z16 2.13" b/w/r
4747
- GDEH029A1 2.9" b/w
4848
- GDEW029T5 2.9" b/w
49+
- GDEM029T94 2.9" b/w
4950
- GDEW029Z10 2.9" b/w/r
5051
- GDEW026T0 2.6" b/w
5152
- GDEW027C44 2.7" b/w/r
@@ -66,7 +67,10 @@ A simple E-Paper display library with common base class and separate IO class fo
6667

6768
### for pin mapping suggestions see ConnectingHardware.md
6869

69-
### Version 3.1.0
70+
### Version 3.1.1
71+
- added support for GDEM029T94 2.9" b/w, actual Waveshare 2.9" b/w
72+
- updated example GxEPD_WiFi_Example, for actual GitHub certificate
73+
#### Version 3.1.0
7074
- added support for GDEH0154D67 1.54" b/w, replacement for GDEP015OC1
7175
- added example GxEPD_MinimumExample, e.g. for memory footprint
7276
#### Version 3.0.9

examples/GxEPD_Example/GxEPD_Example.ino

+15
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
5454
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
5555
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
56+
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
5657
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
5758
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
5859
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
@@ -366,6 +367,20 @@ void showBitmapExample()
366367
}
367368
#endif
368369

370+
#if defined(_GxGDEM029T94_H_)
371+
void showBitmapExample()
372+
{
373+
display.drawExampleBitmap(BitmapExample1, sizeof(BitmapExample1));
374+
delay(2000);
375+
display.drawExampleBitmap(BitmapExample2, sizeof(BitmapExample2));
376+
delay(5000);
377+
display.fillScreen(GxEPD_WHITE);
378+
display.drawExampleBitmap(BitmapExample1, 0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, GxEPD_BLACK);
379+
display.update();
380+
delay(5000);
381+
}
382+
#endif
383+
369384
#if defined(_GxGDEW029Z10_H_)
370385
#define HAS_RED_COLOR
371386
void showBitmapExample()

examples/GxEPD_SD_Example/GxEPD_SD_Example.ino

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ SdFat SD;
8585
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
8686
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
8787
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
88+
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
8889
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
8990
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
9091
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r

examples/GxEPD_WiFi_Example/GxEPD_WiFi_Example.ino

+42-24
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
5858
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
5959
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
60+
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
6061
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
6162
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
6263
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
@@ -105,16 +106,41 @@ const char* ssid = "........";
105106
const char* password = "........";
106107
const int httpPort = 80;
107108
const int httpsPort = 443;
108-
const char* fp_api_github.com = "35 85 74 EF 67 35 A7 CE 40 69 50 F3 C0 F6 80 CF 80 3B 2E 19";
109-
const char* fp_github.com = "ca 06 f5 6b 25 8b 7a 0d 4f 2b 05 47 09 39 47 86 51 15 19 84";
110-
#if USE_BearSSL
111-
const char fp_rawcontent[20] = {0xcc, 0xaa, 0x48, 0x48, 0x66, 0x46, 0x0e, 0x91, 0x53, 0x2c, 0x9c, 0x7c, 0x23, 0x2a, 0xb1, 0x74, 0x4d, 0x29, 0x9d, 0x33};
112-
#else
113-
const char* fp_rawcontent = "cc aa 48 48 66 46 0e 91 53 2c 9c 7c 23 2a b1 74 4d 29 9d 33";
114-
#endif
109+
const char* fp_api_github.com = "df b2 29 c6 a6 38 1a 59 9d c9 ad 92 2d 26 f5 3c 83 8f a5 87"; // as of 25.11.2020
110+
const char* fp_github.com = "5f 3f 7a c2 56 9f 50 a4 66 76 47 c6 a1 8c a0 07 aa ed bb 8e"; // as of 25.11.2020
111+
const char* fp_rawcontent = "70 94 de dd e6 c4 69 48 3a 92 70 a1 48 56 78 2d 18 64 e0 b7"; // as of 25.11.2020
112+
113+
// how to find the certificate was not easy. finally I found it using Mozilla Firefox.
114+
// opened one of the bitmaps, e.g. https://raw.githubusercontent.com/ZinggJM/GxEPD2/master/extras/bitmaps/logo200x200.bmp
115+
// clicked the lock symbol, Connection secure clicked >, show connection details, clicked More Information, clicked View Certificate, clicked Download PEM (chain),
116+
// selected Open with Notepad. Copied the middle certificate and editted to the following format:
117+
// the number of characters per line is of no importance, but the 3 \n are needed
118+
const char* certificate_rawcontent =
119+
"-----BEGIN CERTIFICATE-----\n"
120+
"MIIEsTCCA5mgAwIBAgIQBOHnpNxc8vNtwCtCuF0VnzANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQGE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jA0MDIGBFUdIAAwKjAo"
131+
"BggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAdBgNVHQ4EFgQUUWj/kK8CB3U8zNllZGKiErhZcjswHwYD"
132+
"VR0jBBgwFoAUsT7DaQP4v0cB1JgmGggC72NkK8MwDQYJKoZIhvcNAQELBQADggEBABiKlYkD5m3fXPwdaOpKj4PWUS+Na0QWnqxj"
133+
"9dJubISZi6qBcYRb7TROsLd5kinMLYBq8I4g4Xmk/gNHE+r1hspZcX30BJZr01lYPf7TMSVcGDiEo+afgv2MW5gxTs14nhr9hctJ"
134+
"qvIni5ly/D6q1UEL2tU2ob8cbkdJf17ZSHwD2f2LSaCYJkJA69aSEaRkCldUxPUd1gJea6zuxICaEnL6VpPX/78whQYwvwt/Tv9X"
135+
"BZ0k7YXDK/umdaisLRbvfXknsuvCnQsH6qqF0wGjIChBWUMo0oHjqvbsezt3tkBigAVBRQHvFwY+3sAzm2fTYS5yh+Rp/BIAV0AecPUeybQ=\n"
136+
"-----END CERTIFICATE-----\n";
137+
138+
115139
const char* host_rawcontent = "raw.githubusercontent.com";
116140
const char* path_rawcontent = "/ZinggJM/GxEPD2/master/extras/bitmaps/";
117141
const char* path_prenticedavid = "/prenticedavid/MCUFRIEND_kbv/master/extras/bitmaps/";
142+
const char* path_waveshare_c = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/c/pic/";
143+
const char* path_waveshare_py = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/python/pic/";
118144

119145
void showBitmapFrom_HTTP(const char* host, const char* path, const char* filename, int16_t x, int16_t y, bool with_color = true);
120146
void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filename, const char* fingerprint, int16_t x, int16_t y, bool with_color = true);
@@ -241,11 +267,14 @@ void drawBitmaps_test()
241267
delay(2000);
242268
}
243269

244-
static const uint16_t input_buffer_pixels = 640; // may affect performance
270+
static const uint16_t input_buffer_pixels = 800; // may affect performance
245271

272+
static const uint16_t max_row_width = 1448; // for up to 6" display 1448x1072
246273
static const uint16_t max_palette_pixels = 256; // for depth <= 8
247274

248275
uint8_t input_buffer[3 * input_buffer_pixels]; // up to depth 24
276+
uint8_t output_row_mono_buffer[max_row_width / 8]; // buffer for at least one row of b/w bits
277+
uint8_t output_row_color_buffer[max_row_width / 8]; // buffer for at least one row of color bits
249278
uint8_t mono_palette_buffer[max_palette_pixels / 8]; // palette buffer for depth <= 8 b/w
250279
uint8_t color_palette_buffer[max_palette_pixels / 8]; // palette buffer for depth <= 8 c/w
251280

@@ -485,28 +514,17 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
485514
if ((x >= display.width()) || (y >= display.height())) return;
486515
display.fillScreen(GxEPD_WHITE);
487516
Serial.print("connecting to "); Serial.println(host);
488-
#if USE_BearSSL
489-
if (fingerprint) client.setFingerprint((uint8_t*)fingerprint);
517+
#if defined (ESP8266)
518+
client.setBufferSizes(4096, 4096); // doesn't help
519+
if (fingerprint) client.setFingerprint(fingerprint);
520+
#elif defined (ESP32)
521+
if (certificate) client.setCACert(certificate);
490522
#endif
491523
if (!client.connect(host, httpsPort))
492524
{
493525
Serial.println("connection failed");
494526
return;
495527
}
496-
#if defined (ESP8266) && !USE_BearSSL
497-
if (fingerprint)
498-
{
499-
if (client.verify(fingerprint, host))
500-
{
501-
Serial.println("certificate matches");
502-
}
503-
else
504-
{
505-
Serial.println("certificate doesn't match");
506-
return;
507-
}
508-
}
509-
#endif
510528
Serial.print("requesting URL: ");
511529
Serial.println(String("https://") + host + path + filename);
512530
client.print(String("GET ") + path + filename + " HTTP/1.1\r\n" +

examples/GxFont_GFX_Example/GxFont_GFX_Example.ino

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
//#include <GxGDEH0213B72/GxGDEH0213B72.h> // 2.13" b/w new panel
7676
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
7777
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
78+
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
79+
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
7880
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
7981
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
8082
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w

examples/PagedDisplayForSmallRam/PagedDisplayForSmallRam.ino

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
4848
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
4949
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
50+
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
5051
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
5152
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w // NOTE: does not compile for UNO: segmentation fault, reason unknown
5253
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r

examples/PartialUpdateExample/PartialUpdateExample.ino

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
//#include <GxGDEH0213B73/GxGDEH0213B73.h> // 2.13" b/w newer panel
4747
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
4848
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
49+
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
4950
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
5051
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
5152
//#include <GxGDEW0371W7/GxGDEW0371W7.h> // 3.7" b/w

examples/PartialUpdateTest/PartialUpdateTest.ino

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525

2626
// select the display class to use, only one
2727
//#include <GxGDEP015OC1/GxGDEP015OC1.h>
28-
#include <GxGDEH0154D67/GxGDEH0154D67.h>
28+
//#include <GxGDEH0154D67/GxGDEH0154D67.h>
2929
//#include <GxGDE0213B1/GxGDE0213B1.h>
3030
//#include <GxGDEH029A1/GxGDEH029A1.h>
31+
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
32+
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
3133
//#include <GxGDEW042T2/GxGDEW042T2.h>
3234

3335
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
@@ -103,7 +105,7 @@ GxEPD_Class display(io /*RST=9*/ /*BUSY=7*/); // default selection of (9), 7
103105
#if defined(_GxGDEP015OC1_H_) || defined(_GxGDEH0154D67_H_)
104106
const uint32_t partial_update_period_s = 1;
105107
const uint32_t full_update_period_s = 6 * 60 * 60;
106-
#elif defined(_GxGDE0213B1_H_) || defined(_GxGDEH029A1_H_) || defined(_GxGDEW042T2_H_)
108+
#elif defined(_GxGDE0213B1_H_) || defined(_GxGDEH029A1_H_) || defined(_GxGDEM029T94_H_) || defined(_GxGDEW042T2_H_)
107109
const uint32_t partial_update_period_s = 2;
108110
const uint32_t full_update_period_s = 1 * 60 * 60;
109111
#endif

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=GxEPD
2-
version=3.1.0
2+
version=3.1.1
33
author=Jean-Marc Zingg
44
maintainer=Jean-Marc Zingg
55
sentence=Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.

0 commit comments

Comments
 (0)