Skip to content

Commit 306dfc8

Browse files
committed
Adding CP examples for ThinkInk
Adding CircuitPython examples for tri-color and ACeP EInk displays
1 parent b3fd880 commit 306dfc8

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft 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 for a 5.65" ACeP eInk Display
7+
with the Feather RP2040 ThinkInk'''
8+
9+
import board
10+
import displayio
11+
import busio
12+
import adafruit_spd1656
13+
14+
displayio.release_displays()
15+
16+
# this pinout is for the Feather RP2040 ThinkInk
17+
spi = busio.SPI(board.EPD_SCK, MOSI=board.EPD_MOSI, MISO=None)
18+
epd_cs = board.EPD_CS
19+
epd_dc = board.EPD_DC
20+
epd_reset = board.EPD_RESET
21+
epd_busy = board.EPD_BUSY
22+
display_bus = displayio.FourWire(
23+
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
24+
)
25+
26+
display = adafruit_spd1656.SPD1656(
27+
display_bus, width=600, height=448, busy_pin=epd_busy
28+
)
29+
30+
g = displayio.Group()
31+
32+
fn = "/display-ruler-720p.bmp"
33+
34+
with open(fn, "rb") as f:
35+
pic = displayio.OnDiskBitmap(f)
36+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
37+
g.append(t)
38+
39+
display.show(g)
40+
41+
display.refresh()
42+
43+
while True:
44+
pass
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
# SPDX-FileCopyrightText: Copyright (c) 2023 Jose D. Montoya
3+
#
4+
# SPDX-License-Identifier: Unlicense
5+
6+
'''Simple test for the Adafruit 2.13" Tri-Color eInk Display
7+
with the Feather RP2040 ThinkInk'''
8+
9+
import time
10+
import board
11+
import displayio
12+
import busio
13+
import adafruit_ssd1680
14+
15+
displayio.release_displays()
16+
17+
# this pinout is for the Feather RP2040 ThinkInk
18+
spi = busio.SPI(board.EPD_SCK, MOSI=board.EPD_MOSI, MISO=None)
19+
epd_cs = board.EPD_CS
20+
epd_dc = board.EPD_DC
21+
epd_reset = board.EPD_RESET
22+
epd_busy = board.EPD_BUSY
23+
display_bus = displayio.FourWire(
24+
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
25+
)
26+
time.sleep(1)
27+
28+
display = adafruit_ssd1680.SSD1680(
29+
display_bus,
30+
colstart=8,
31+
width=250,
32+
height=122,
33+
highlight_color=0xFF0000,
34+
rotation=270,
35+
)
36+
37+
g = displayio.Group()
38+
39+
with open("/display-ruler.bmp", "rb") as f:
40+
pic = displayio.OnDiskBitmap(f)
41+
42+
t = displayio.TileGrid(
43+
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
44+
)
45+
46+
g.append(t)
47+
48+
display.show(g)
49+
50+
display.refresh()
51+
52+
print("refreshed")
53+
54+
while True:
55+
pass

0 commit comments

Comments
 (0)