Skip to content

Commit 9db75ba

Browse files
committed
add 200*200 tricolor z90
1 parent b5b6fcf commit 9db75ba

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

examples/ThinkInk_tricolor/ThinkInk_tricolor.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
#define SRAM_CS 6 // can set to -1 to not use a pin (uses a lot of RAM!)
1616
#define EPD_RESET 8 // can set to -1 and share with chip Reset (can't deep sleep)
1717

18-
// 1.54" Tricolor EPD with SSD1680 chipset
18+
// 1.54" 152x152 Tricolor EPD with ILI0373 chipset
1919
//ThinkInk_154_Tricolor_Z17 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
2020

21-
// 1.54" Tricolor EPD with SSD1680 chipset
21+
// 1.54" 152x152 Tricolor EPD with SSD1680 chipset
2222
//ThinkInk_154_Tricolor_RW display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
2323

24+
// 1.54" 200x200 Tricolor EPD with SSD1681 chipset
25+
//ThinkInk_154_Tricolor_Z90 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
26+
2427
// 2.13" Tricolor EPD with SSD1680 chipset
2528
//ThinkInk_213_Tricolor_RW display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
2629

src/Adafruit_ThinkInk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include "panels/ThinkInk_154_Tricolor_RW.h"
77
#include "panels/ThinkInk_154_Tricolor_Z17.h"
8+
#include "panels/ThinkInk_154_Tricolor_Z90.h"
89
#include "panels/ThinkInk_213_Tricolor_RW.h"
910
#include "panels/ThinkInk_213_Tricolor_Z16.h"
1011
#include "panels/ThinkInk_270_Tricolor_C44.h"

src/panels/ThinkInk_154_Tricolor_RW.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class ThinkInk_154_Tricolor_RW : public Adafruit_SSD1680 {
99
ThinkInk_154_Tricolor_RW(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST,
1010
int8_t CS, int8_t SRCS, int8_t MISO,
1111
int8_t BUSY = -1)
12-
: Adafruit_SSD1680(250, 152, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){};
12+
: Adafruit_SSD1680(152, 152, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){};
1313

1414
ThinkInk_154_Tricolor_RW(int8_t DC, int8_t RST, int8_t CS, int8_t SRCS,
1515
int8_t BUSY = -1, SPIClass *spi = &SPI)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#ifndef _THINKINK_154_TRICOLOR_Z90_H
2+
#define _THINKINK_154_TRICOLOR_Z90_H
3+
4+
// This file is #included by Adafruit_ThinkInk.h and does not need to
5+
// #include anything else to pick up the EPD header or ink mode enum.
6+
7+
class ThinkInk_154_Tricolor_Z90 : public Adafruit_SSD1681 {
8+
public:
9+
ThinkInk_154_Tricolor_Z90(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST,
10+
int8_t CS, int8_t SRCS, int8_t MISO,
11+
int8_t BUSY = -1)
12+
: Adafruit_SSD1681(200, 200, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){};
13+
14+
ThinkInk_154_Tricolor_Z90(int8_t DC, int8_t RST, int8_t CS, int8_t SRCS,
15+
int8_t BUSY = -1, SPIClass *spi = &SPI)
16+
: Adafruit_SSD1681(200, 200, DC, RST, CS, SRCS, BUSY, spi){};
17+
18+
void begin(thinkinkmode_t mode = THINKINK_MONO) {
19+
Adafruit_SSD1681::begin(true);
20+
21+
inkmode = mode; // Preserve ink mode for ImageReader or others
22+
23+
layer_colors[EPD_WHITE] = 0b00;
24+
layer_colors[EPD_BLACK] = 0b01;
25+
layer_colors[EPD_RED] = 0b10;
26+
layer_colors[EPD_GRAY] = 0b10;
27+
layer_colors[EPD_LIGHT] = 0b00;
28+
layer_colors[EPD_DARK] = 0b01;
29+
30+
default_refresh_delay = 13000;
31+
setRotation(3);
32+
powerDown();
33+
}
34+
};
35+
36+
#endif // _THINKINK_154_TRI

0 commit comments

Comments
 (0)