test
This commit is contained in:
parent
d6347a0afc
commit
11ddbe45ca
1 changed files with 3 additions and 3 deletions
6
oled.py
6
oled.py
|
@ -3,7 +3,7 @@
|
||||||
# License: Public Domain
|
# License: Public Domain
|
||||||
|
|
||||||
# Import all board pins.
|
# Import all board pins.
|
||||||
from board import SCL, SDA
|
#from board import SCL, SDA
|
||||||
import busio
|
import busio
|
||||||
|
|
||||||
# Import the SSD1306 module.
|
# Import the SSD1306 module.
|
||||||
|
@ -16,9 +16,9 @@ i2c = busio.I2C(SCL, SDA)
|
||||||
# Create the SSD1306 OLED class.
|
# Create the SSD1306 OLED class.
|
||||||
# The first two parameters are the pixel width and pixel height. Change these
|
# The first two parameters are the pixel width and pixel height. Change these
|
||||||
# to the right size for your display!
|
# to the right size for your display!
|
||||||
display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)
|
#display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)
|
||||||
# Alternatively you can change the I2C address of the device with an addr parameter:
|
# Alternatively you can change the I2C address of the device with an addr parameter:
|
||||||
#display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c, addr=0x31)
|
display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c, addr=0x31)
|
||||||
|
|
||||||
# Clear the display. Always call show after changing pixels to make the display
|
# Clear the display. Always call show after changing pixels to make the display
|
||||||
# update visible!
|
# update visible!
|
||||||
|
|
Loading…
Reference in a new issue