Datasheet

#import adafruit_il0398
# Set based on your display
FLEXIBLE = False
TRICOLOR = True
ROTATION = 90
# Used to ensure the display is free in CircuitPython
displayio.release_displays()
# Define the pins needed for display use
# This pinout is for a Feather M4 and may be different for other boards
# For the Metro/Shield, esc is board.D10 and dc is board.D9
spi = board.SPI() # Uses SCK and MOSI
ecs = board.D9
dc = board.D10
rst = board.D5 # set to None for FeatherWing/Shield
busy = board.D6 # set to None for FeatherWing/Shield
if TRICOLOR:
highlight = 0xff0000 #third color is red (0xff0000)
else:
highlight = 0x000000
# Create the displayio connection to the display pins
display_bus = displayio.FourWire(spi, command=dc, chip_select=ecs,
reset=rst, baudrate=1000000)
time.sleep(1) # Wait a bit
# Create the display object
#display = adafruit_ssd1608.SSD1608(display_bus, width=200, height=200, # 1.54" HD Monochrome
#display = adafruit_ssd1675.SSD1675(display_bus, width=122, height=250, # 2.13" HD Monochrome
#display = adafruit_il91874.IL91874(display_bus, width=264, height=176, # 2.7" Tri-color
#display = adafruit_il0398.IL0398(display_bus, width=400, height=300, # 4.2" Tri-color
#display = adafruit_il0373.IL0373(display_bus, width=152, height=152, # 1.54" Tri-color
#display = adafruit_il0373.IL0373(display_bus, width=296, height=128, swap_rams=FLEXIBLE, # 2.9" Tri-
color OR Flexible Monochrome
display = adafruit_il0373.IL0373(display_bus, width=212, height=104, swap_rams=FLEXIBLE, # 2.13" Tri-
color OR Flexible Monochrome
busy_pin=busy, rotation=ROTATION,
highlight_color=highlight)
# Create a display group for our screen objects
g = displayio.Group()
# Display a ruler graphic from the root directory of the CIRCUITPY drive
f = open("/display-ruler.bmp", "rb")
pic = displayio.OnDiskBitmap(f)
# Create a Tilegrid with the bitmap and put in the displayio group
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
# Place the display group on the screen
display.show(g)
# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()
© Adafruit Industries https://learn.adafruit.com/adafruit-eink-display-breakouts Page 33 of 61