Skip to content

Commit 9b2c058

Browse files
committed
the 800x480s
1 parent fba933d commit 9b2c058

File tree

16 files changed

+689
-6
lines changed

16 files changed

+689
-6
lines changed

Bare_eInk_Guide/212x104_flexible_monochrome_python/code.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import digitalio
1313
from PIL import Image, ImageDraw, ImageFont
1414

15-
from adafruit_epd.il0373 import Adafruit_IL0373
15+
from adafruit_epd.il0373 import Adafruit_IL0373, Adafruit_IL0373_213_Flex_Mono
1616

1717
# First define some color constants
1818
WHITE = (0xFF, 0xFF, 0xFF)
@@ -34,18 +34,15 @@
3434
busy = digitalio.DigitalInOut(board.D17)
3535

3636
# give them all to our driver
37-
display = Adafruit_IL0373(104, 212,
37+
display = Adafruit_IL0373_213_Flex_Mono(104, 212,
3838
spi,
3939
cs_pin=ecs,
4040
dc_pin=dc,
4141
sramcs_pin=srcs,
4242
rst_pin=rst,
4343
busy_pin=busy,
44-
pid=4243 # special arg to use different power up
4544
)
4645

47-
display.set_black_buffer(1, True)
48-
display.set_color_buffer(0, True)
4946
display.rotation = 3
5047
width = display.width
5148
height = display.height

Bare_eInk_Guide/648x480_monochrome_arduino/.uno.test.only

Whitespace-only changes.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
// SPDX-FileCopyrightText: 2025 Ladyada for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
4+
5+
/***************************************************
6+
Adafruit invests time and resources providing this open source code,
7+
please support Adafruit and open-source hardware by purchasing
8+
products from Adafruit!
9+
10+
Written by Limor Fried/Ladyada for Adafruit Industries.
11+
MIT license, all text above must be included in any redistribution
12+
****************************************************/
13+
14+
#include "Adafruit_ThinkInk.h"
15+
16+
#ifdef ARDUINO_ADAFRUIT_FEATHER_RP2040_THINKINK // detects if compiling for
17+
// Feather RP2040 ThinkInk
18+
#define EPD_DC PIN_EPD_DC // ThinkInk 24-pin connector DC
19+
#define EPD_CS PIN_EPD_CS // ThinkInk 24-pin connector CS
20+
#define EPD_BUSY PIN_EPD_BUSY // ThinkInk 24-pin connector Busy
21+
#define SRAM_CS -1 // use onboard RAM
22+
#define EPD_RESET PIN_EPD_RESET // ThinkInk 24-pin connector Reset
23+
#define EPD_SPI &SPI1 // secondary SPI for ThinkInk
24+
#else
25+
#define EPD_DC 10
26+
#define EPD_CS 9
27+
#define EPD_BUSY 7 // can set to -1 to not use a pin (will wait a fixed delay)
28+
#define SRAM_CS 6
29+
#define EPD_RESET 8 // can set to -1 and share with microcontroller Reset!
30+
#define EPD_SPI &SPI // primary SPI
31+
#endif
32+
33+
// 5.83" Monochrome displays with 648 x 480 pixels and UC8179 chipset
34+
ThinkInk_583_Mono_AAAMFGN display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
35+
36+
void setup() {
37+
Serial.begin(115200);
38+
while (!Serial) {
39+
delay(10);
40+
}
41+
Serial.println("Adafruit EPD full update test in mono");
42+
Serial.println("5.83 Monochrome EPD with UC8179 chipset");
43+
display.begin(THINKINK_MONO);
44+
}
45+
46+
void loop() {
47+
Serial.println("Banner demo");
48+
display.clearBuffer();
49+
display.setTextSize(3);
50+
display.setCursor((display.width() - 180) / 2, (display.height() - 24) / 2);
51+
display.setTextColor(EPD_BLACK);
52+
display.print("Monochrome");
53+
display.display();
54+
55+
delay(2000);
56+
57+
Serial.println("B/W rectangle demo");
58+
display.clearBuffer();
59+
display.fillRect(display.width() / 2, 0, display.width() / 2,
60+
display.height(), EPD_BLACK);
61+
display.display();
62+
63+
delay(2000);
64+
65+
Serial.println("Text demo");
66+
// large block of text
67+
display.clearBuffer();
68+
display.setTextSize(1);
69+
testdrawtext(
70+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur "
71+
"adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, "
72+
"fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor "
73+
"neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet "
74+
"ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a "
75+
"tortor imperdiet posuere. ",
76+
EPD_BLACK);
77+
display.display();
78+
79+
delay(2000);
80+
81+
display.clearBuffer();
82+
for (int16_t i = 0; i < display.width(); i += 4) {
83+
display.drawLine(0, 0, i, display.height() - 1, EPD_BLACK);
84+
}
85+
86+
for (int16_t i = 0; i < display.height(); i += 4) {
87+
display.drawLine(display.width() - 1, 0, 0, i, EPD_BLACK);
88+
}
89+
display.display();
90+
91+
delay(2000);
92+
}
93+
94+
void testdrawtext(const char *text, uint16_t color) {
95+
display.setCursor(0, 0);
96+
display.setTextColor(color);
97+
display.setTextWrap(true);
98+
display.print(text);
99+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-FileCopyrightText: 2025 Scott Shawcroft, written for Adafruit Industries
2+
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
3+
#
4+
# SPDX-License-Identifier: Unlicense
5+
6+
"""Simple test script for 5.83" 648x480 monochrome display (ThinkInk_583_Mono_AAAMFGN)."""
7+
8+
import time
9+
10+
import board
11+
import busio
12+
import displayio
13+
from fourwire import FourWire
14+
15+
import adafruit_uc8179
16+
17+
displayio.release_displays()
18+
19+
if "EPD_MOSI" in dir(board): # Feather RP2040 ThinkInk
20+
spi = busio.SPI(board.EPD_SCK, MOSI=board.EPD_MOSI, MISO=None)
21+
epd_cs = board.EPD_CS
22+
epd_dc = board.EPD_DC
23+
epd_reset = board.EPD_RESET
24+
epd_busy = board.EPD_BUSY
25+
else:
26+
spi = board.SPI() # Uses SCK and MOSI
27+
epd_cs = board.D9
28+
epd_dc = board.D10
29+
epd_reset = board.D8 # Set to None for FeatherWing
30+
epd_busy = board.D7 # Set to None for FeatherWing
31+
32+
display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000)
33+
time.sleep(1)
34+
35+
display = adafruit_uc8179.UC8179(
36+
display_bus,
37+
width=648,
38+
height=480,
39+
busy_pin=epd_busy,
40+
rotation=180,
41+
black_bits_inverted=True,
42+
colstart=0,
43+
)
44+
45+
g = displayio.Group()
46+
47+
pic = displayio.OnDiskBitmap("/display-ruler-1280x720.bmp")
48+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
49+
g.append(t)
50+
51+
display.root_group = g
52+
53+
display.refresh()
54+
55+
print("refreshed")
56+
57+
time.sleep(display.time_to_refresh + 5)
58+
print("waited correct time")
59+
60+
# Keep the display the same
61+
while True:
62+
time.sleep(10)
Binary file not shown.

Bare_eInk_Guide/648x480_monochrome_python/code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
# First define some color constants
1818
WHITE = (0xFF, 0xFF, 0xFF)
19-
BLACK = (0x00, 0x00, 0x00)
2019
BLACK = (0xFF, 0x00, 0x00)
2120

2221
# Next define some constants to allow easy resizing of shapes and colors

Bare_eInk_Guide/800x480_monochrome_arduino/.uno.test.only

Whitespace-only changes.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
// SPDX-FileCopyrightText: 2025 Ladyada for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
4+
5+
/***************************************************
6+
Adafruit invests time and resources providing this open source code,
7+
please support Adafruit and open-source hardware by purchasing
8+
products from Adafruit!
9+
10+
Written by Limor Fried/Ladyada for Adafruit Industries.
11+
MIT license, all text above must be included in any redistribution
12+
****************************************************/
13+
14+
#include "Adafruit_ThinkInk.h"
15+
16+
#ifdef ARDUINO_ADAFRUIT_FEATHER_RP2040_THINKINK // detects if compiling for
17+
// Feather RP2040 ThinkInk
18+
#define EPD_DC PIN_EPD_DC // ThinkInk 24-pin connector DC
19+
#define EPD_CS PIN_EPD_CS // ThinkInk 24-pin connector CS
20+
#define EPD_BUSY PIN_EPD_BUSY // ThinkInk 24-pin connector Busy
21+
#define SRAM_CS -1 // use onboard RAM
22+
#define EPD_RESET PIN_EPD_RESET // ThinkInk 24-pin connector Reset
23+
#define EPD_SPI &SPI1 // secondary SPI for ThinkInk
24+
#else
25+
#define EPD_DC 10
26+
#define EPD_CS 9
27+
#define EPD_BUSY 7 // can set to -1 to not use a pin (will wait a fixed delay)
28+
#define SRAM_CS 6
29+
#define EPD_RESET 8 // can set to -1 and share with microcontroller Reset!
30+
#define EPD_SPI &SPI // primary SPI
31+
#endif
32+
33+
// 7.5" Monochrome displays with 800 x 480 pixels and UC8179 chipset
34+
ThinkInk_750_Mono_AAAMFGN display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
35+
36+
void setup() {
37+
Serial.begin(115200);
38+
while (!Serial) {
39+
delay(10);
40+
}
41+
Serial.println("Adafruit EPD full update test in mono");
42+
Serial.println("7.5 Monochrome EPD with UC8179 chipset");
43+
display.begin(THINKINK_MONO);
44+
}
45+
46+
void loop() {
47+
Serial.println("Banner demo");
48+
display.clearBuffer();
49+
display.setTextSize(3);
50+
display.setCursor((display.width() - 180) / 2, (display.height() - 24) / 2);
51+
display.setTextColor(EPD_BLACK);
52+
display.print("Monochrome");
53+
display.display();
54+
55+
delay(2000);
56+
57+
Serial.println("B/W rectangle demo");
58+
display.clearBuffer();
59+
display.fillRect(display.width() / 2, 0, display.width() / 2,
60+
display.height(), EPD_BLACK);
61+
display.display();
62+
63+
delay(2000);
64+
65+
Serial.println("Text demo");
66+
// large block of text
67+
display.clearBuffer();
68+
display.setTextSize(1);
69+
testdrawtext(
70+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur "
71+
"adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, "
72+
"fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor "
73+
"neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet "
74+
"ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a "
75+
"tortor imperdiet posuere. ",
76+
EPD_BLACK);
77+
display.display();
78+
79+
delay(2000);
80+
81+
display.clearBuffer();
82+
for (int16_t i = 0; i < display.width(); i += 4) {
83+
display.drawLine(0, 0, i, display.height() - 1, EPD_BLACK);
84+
}
85+
86+
for (int16_t i = 0; i < display.height(); i += 4) {
87+
display.drawLine(display.width() - 1, 0, 0, i, EPD_BLACK);
88+
}
89+
display.display();
90+
91+
delay(2000);
92+
}
93+
94+
void testdrawtext(const char *text, uint16_t color) {
95+
display.setCursor(0, 0);
96+
display.setTextColor(color);
97+
display.setTextWrap(true);
98+
display.print(text);
99+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-FileCopyrightText: 2025 Scott Shawcroft, written for Adafruit Industries
2+
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
3+
#
4+
# SPDX-License-Identifier: Unlicense
5+
6+
"""Simple test script for 7.5" 800x480 monochrome display"""
7+
8+
import time
9+
10+
import board
11+
import busio
12+
import displayio
13+
from fourwire import FourWire
14+
15+
import adafruit_uc8179
16+
17+
displayio.release_displays()
18+
19+
if "EPD_MOSI" in dir(board): # Feather RP2040 ThinkInk
20+
spi = busio.SPI(board.EPD_SCK, MOSI=board.EPD_MOSI, MISO=None)
21+
epd_cs = board.EPD_CS
22+
epd_dc = board.EPD_DC
23+
epd_reset = board.EPD_RESET
24+
epd_busy = board.EPD_BUSY
25+
else:
26+
spi = board.SPI() # Uses SCK and MOSI
27+
epd_cs = board.D9
28+
epd_dc = board.D10
29+
epd_reset = board.D8 # Set to None for FeatherWing
30+
epd_busy = board.D7 # Set to None for FeatherWing
31+
32+
display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000)
33+
time.sleep(1)
34+
35+
display = adafruit_uc8179.UC8179(
36+
display_bus,
37+
width=800,
38+
height=480,
39+
busy_pin=epd_busy,
40+
rotation=180,
41+
black_bits_inverted=True,
42+
colstart=0,
43+
)
44+
45+
g = displayio.Group()
46+
47+
pic = displayio.OnDiskBitmap("/display-ruler-1280x720.bmp")
48+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
49+
g.append(t)
50+
51+
display.root_group = g
52+
53+
display.refresh()
54+
55+
print("refreshed")
56+
57+
time.sleep(display.time_to_refresh + 5)
58+
print("waited correct time")
59+
60+
# Keep the display the same
61+
while True:
62+
time.sleep(10)
Binary file not shown.

0 commit comments

Comments
 (0)