Simple test

Ensure your monochrome featherwing works with this simple test.

examples/ssd1675_simpletest.py
 1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
 2# SPDX-License-Identifier: MIT
 3
 4"""Simple test script for 2.13" 250x122 black and white featherwing.
 5
 6Supported products:
 7  * Adafruit 2.13" Black and White FeatherWing
 8    * https://www.adafruit.com/product/4195
 9  """
10
11import time
12import board
13import displayio
14import adafruit_ssd1675
15
16displayio.release_displays()
17
18epd_cs = board.D9
19epd_dc = board.D10
20
21display_bus = displayio.FourWire(
22    board.SPI(), command=epd_dc, chip_select=epd_cs, baudrate=1000000
23)
24time.sleep(1)
25
26display = adafruit_ssd1675.SSD1675(display_bus, width=250, height=122, rotation=270)
27
28g = displayio.Group()
29
30with open("/display-ruler.bmp", "rb") as f:
31    pic = displayio.OnDiskBitmap(f)
32    # CircuitPython 6 & 7 compatible
33    t = displayio.TileGrid(
34        pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
35    )
36    # CircuitPython 7 compatible only
37    # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
38    g.append(t)
39
40    display.show(g)
41
42    display.refresh()
43
44    print("refreshed")
45
46    time.sleep(120)

2.13” Monochrome

Ensure your 2.13” Monochrome breakout works with this simple test.

examples/ssd1675_2.13_monochrome.py
 1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
 2# SPDX-License-Identifier: MIT
 3
 4"""Simple test script for 2.13" 250x122 monochrome display.
 5
 6Supported products:
 7  * Adafruit 2.13" Monochrome ePaper Display Breakout
 8    * https://www.adafruit.com/product/4197
 9  """
10
11import time
12import board
13import displayio
14import adafruit_ssd1675
15
16displayio.release_displays()
17
18# This pinout works on a Feather M4 and may need to be altered for other boards.
19spi = board.SPI()  # Uses SCK and MOSI
20epd_cs = board.D9
21epd_dc = board.D10
22epd_reset = board.D5
23epd_busy = board.D6
24
25display_bus = displayio.FourWire(
26    spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
27)
28time.sleep(1)
29
30display = adafruit_ssd1675.SSD1675(
31    display_bus, width=250, height=122, rotation=270, busy_pin=epd_busy
32)
33
34g = displayio.Group()
35
36with open("/display-ruler.bmp", "rb") as f:
37    pic = displayio.OnDiskBitmap(f)
38    # CircuitPython 6 & 7 compatible
39    t = displayio.TileGrid(
40        pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
41    )
42    # CircuitPython 7 compatible only
43    # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
44    g.append(t)
45
46    display.show(g)
47
48    display.refresh()
49
50    print("refreshed")
51
52    time.sleep(120)