Skip to content

Commit

Permalink
Merge pull request #5 from makermelissa/master
Browse files Browse the repository at this point in the history
Updated reset to use D9 for I2C
  • Loading branch information
makermelissa authored Nov 20, 2019
2 parents b4e3d41 + b237131 commit 51f0d1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/displayio_ssd1305_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@

displayio.release_displays()

# Reset is usedfor both SPI and I2C
oled_reset = board.D9

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

# 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)

WIDTH = 128
HEIGHT = 64 # Change to 32 if needed
Expand Down

0 comments on commit 51f0d1f

Please sign in to comment.