Skip to content

Commit

Permalink
Merge pull request #5 from makermelissa/master
Browse files Browse the repository at this point in the history
Updated for I2C and SPI to both use Reset Pin
  • Loading branch information
ladyada committed Sep 24, 2019
2 parents ad3e9a3 + d4ef204 commit 7a999c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/displayio_ssd1306_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@

displayio.release_displays()

oled_reset = board.D9

# Use for I2C
i2c = board.I2C()
display_bus = displayio.I2CDisplay(i2c, device_address=0x3c)
display_bus = displayio.I2CDisplay(i2c, device_address=0x3c, reset=oled_reset)

# Use for SPI
#spi = board.SPI()
#oled_cs = board.D5
#oled_dc = board.D6
#oled_reset = board.D9
#display_bus = displayio.FourWire(spi, command=oled_dc, chip_select=oled_cs,
# reset=oled_reset, baudrate=1000000)

Expand Down

0 comments on commit 7a999c4

Please sign in to comment.