Skip to content

Commit 51f0d1f

Browse files
authored
Merge pull request #5 from makermelissa/master
Updated reset to use D9 for I2C
2 parents b4e3d41 + b237131 commit 51f0d1f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/displayio_ssd1305_simpletest.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@
1111

1212
displayio.release_displays()
1313

14+
# Reset is usedfor both SPI and I2C
15+
oled_reset = board.D9
16+
1417
# Use for SPI
1518
spi = board.SPI()
1619
oled_cs = board.D5
1720
oled_dc = board.D6
1821
display_bus = displayio.FourWire(spi, command=oled_dc, chip_select=oled_cs,
19-
baudrate=1000000, reset=board.D9)
22+
baudrate=1000000, reset=oled_reset)
2023

2124
# Use for I2C
2225
# i2c = board.I2C()
23-
# display_bus = displayio.I2CDisplay(i2c, device_address=0x3c)
26+
# display_bus = displayio.I2CDisplay(i2c, device_address=0x3c, reset=oled_reset)
2427

2528
WIDTH = 128
2629
HEIGHT = 64 # Change to 32 if needed

0 commit comments

Comments
 (0)