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