Skip to content

Commit 7a999c4

Browse files
authored
Merge pull request #5 from makermelissa/master
Updated for I2C and SPI to both use Reset Pin
2 parents ad3e9a3 + d4ef204 commit 7a999c4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/displayio_ssd1306_simpletest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111

1212
displayio.release_displays()
1313

14+
oled_reset = board.D9
15+
1416
# Use for I2C
1517
i2c = board.I2C()
16-
display_bus = displayio.I2CDisplay(i2c, device_address=0x3c)
18+
display_bus = displayio.I2CDisplay(i2c, device_address=0x3c, reset=oled_reset)
1719

1820
# Use for SPI
1921
#spi = board.SPI()
2022
#oled_cs = board.D5
2123
#oled_dc = board.D6
22-
#oled_reset = board.D9
2324
#display_bus = displayio.FourWire(spi, command=oled_dc, chip_select=oled_cs,
2425
# reset=oled_reset, baudrate=1000000)
2526

0 commit comments

Comments
 (0)