Datasheet
display.refresh()
print("refreshed")
time.sleep(180)
We start by importing the libraries that we need. In this case we need time for adding delays, board the pin
definitions, and of course displayio .
import time
import board
import displayio
Next you want to uncomment the import statement for the correct driver for your display. This should match the file
you copied over earlier. In our case, the 2.9" uses the adafruit_il0373 driver, so we can leave it as is.
# Make sure your display driver is uncommented
import adafruit_il0373
#import adafruit_il91874
#import adafruit_ssd1608
#import adafruit_ssd1675
#import adafruit_il0398
Next we want to set these variables based on your display. If you have a flexible display, you would want to change
FLEXIBLE to True . If you have a monochrome display, you would want to change TRICOLOR to False . If you would
like to change the rotation, you can do that here as well.
# Set based on your display
FLEXIBLE = False
TRICOLOR = True
ROTATION = 90
Next we release any previously used displays. This is important because if the Feather is reset, the display pins are not
automatically released and this makes them available for use again.
displayio.release_displays()
Next we assign the Pins to use. Note that we are not using the SRAM on the eInk display, so we only need to connect
the SCK and MOSI SPI pins. We set the SPI object to the board's SPI with the easy shortcut function board.SPI() . We
also have the ePaper Display Chip Select and Data/Command pins.
For the breakout boards only, we define the Reset and Busy pins, otherwise you would change these to None in the
case of a shield or FeatherWing.
spi = board.SPI() # Uses SCK and MOSI
ecs = board.D9
dc = board.D10
rst = board.D5 # can be None to not use this pin
busy = board.D6 # can be None to not use this pin
In the next section, we set the highlight color to either red or black based on whether you have a monochrome or tri-
© Adafruit Industries https://learn.adafruit.com/adafruit-eink-display-breakouts Page 34 of 61










