Skip to content

Commit c0a2409

Browse files
committed
add 2.7" tricolor revision panel
1 parent a5e25d7 commit c0a2409

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

examples/ThinkInk_tricolor/ThinkInk_tricolor.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
//ThinkInk_154_Tricolor_RW display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
2020
//ThinkInk_213_Tricolor_RW display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
2121
//ThinkInk_213_Tricolor_Z16 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
22+
23+
// 2.7" Tricolor Featherwing or Breakout with IL91874 chipset
2224
//ThinkInk_270_Tricolor_C44 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
25+
26+
// 2.7" Tricolor Featherwing or Breakout with EK79686 chipset
27+
//ThinkInk_270_Tricolor_Z70 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
28+
2329
// 2.9" Tricolor Featherwing or Breakout:
2430
ThinkInk_290_Tricolor_Z10 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
31+
2532
//ThinkInk_420_Tricolor_RW display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
2633

2734
void setup() {

src/Adafruit_ThinkInk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ typedef enum {
1414
#include "panels/ThinkInk_213_Tricolor_RW.h"
1515
#include "panels/ThinkInk_213_Tricolor_Z16.h"
1616
#include "panels/ThinkInk_270_Tricolor_C44.h"
17+
#include "panels/ThinkInk_270_Tricolor_Z70.h"
1718
#include "panels/ThinkInk_290_Tricolor_Z10.h"
1819
#include "panels/ThinkInk_420_Tricolor_RW.h"
1920

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#ifndef _THINKINK_270_TRICOLOR_Z70_H
2+
#define _THINKINK_270_TRICOLOR_Z70_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_270_Tricolor_Z70 : public Adafruit_EK79686 {
8+
public:
9+
ThinkInk_270_Tricolor_Z70(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_EK79686(264, 176, SID, SCLK, DC, RST, CS, SRCS, MISO, -1){};
13+
14+
ThinkInk_270_Tricolor_Z70(int8_t DC, int8_t RST, int8_t CS, int8_t SRCS,
15+
int8_t BUSY = -1, SPIClass *spi = &SPI)
16+
: Adafruit_EK79686(264, 176, DC, RST, CS, SRCS, -1, spi){};
17+
18+
void begin(thinkinkmode_t mode = THINKINK_TRICOLOR) {
19+
Adafruit_EK79686::begin(true);
20+
21+
inkmode = mode; // Preserve ink mode for ImageReader or others
22+
23+
layer_colors[EPD_WHITE] = 0b10;
24+
layer_colors[EPD_BLACK] = 0b01;
25+
layer_colors[EPD_RED] = 0b10;
26+
layer_colors[EPD_GRAY] = 0b10;
27+
layer_colors[EPD_LIGHT] = 0b10;
28+
layer_colors[EPD_DARK] = 0b01;
29+
30+
default_refresh_delay = 13000;
31+
powerDown();
32+
}
33+
34+
thinkinkmode_t getMode(void) { return inkmode; }
35+
36+
private:
37+
thinkinkmode_t inkmode; // Ink mode passed to begin()
38+
};
39+
40+
#endif // _THINKINK_270_TRICOLOR_Z70_H

0 commit comments

Comments
 (0)