Merge pull request #15 from makermelissa/master

Add reset/busy so example works with breakout
This commit is contained in:
Melissa LeBlanc-Williams 2022-05-16 12:25:59 -06:00 committed by GitHub
commit e37a9341d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,16 +23,23 @@ displayio.release_displays()
spi = board.SPI() spi = board.SPI()
epd_cs = board.D10 epd_cs = board.D10
epd_dc = board.D9 epd_dc = board.D9
epd_reset = board.D5
epd_busy = board.D6
# Create the displayio connection to the display pins # Create the displayio connection to the display pins
display_bus = displayio.FourWire( display_bus = displayio.FourWire(
spi, command=epd_dc, chip_select=epd_cs, baudrate=1000000 spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
) )
time.sleep(1) # Wait a bit time.sleep(1) # Wait a bit
# Create the display object - the third color is red (0xff0000) # Create the display object - the third color is red (0xff0000)
display = adafruit_il91874.IL91874( display = adafruit_il91874.IL91874(
display_bus, width=264, height=176, highlight_color=0xFF0000, rotation=90 display_bus,
width=264,
height=176,
busy_pin=epd_busy,
highlight_color=0xFF0000,
rotation=90,
) )
# Create a display group for our screen objects # Create a display group for our screen objects