from machine import I2C, Pin
import ssd1306
from time import sleep
import time
i2cOLED=I2C(0, scl=Pin((17)), sda=Pin((16)))
oled_width = 128
oled_height = 64
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2cOLED)
oled.fill(0)
oled.show()
oled.rect(0, 0, 128, 64, 1)
oled.show()
oled.line(0, 0, 16, 16, 1)
oled.show()
oled.line(112, 16, 128, 0, 1)
oled.show()
oled.line(0, 64, 16, 48, 1)
oled.show()
oled.line(128, 64, 112, 48, 1)
oled.show()
oled.fill_rect(16, 16, 96, 32, 1)
oled.show()
oled.text('Hello', 20, 5)
oled.show()
time.sleep(1)Loading
ssd1306
ssd1306