from machine import Pin
import time
from machine import SoftI2C
from ssd1306 import SSD1306_I2C
i2c = SoftI2C(sda=Pin(23), scl=Pin(18))
oled = SSD1306_I2C(128, 64, i2c)
if __name__=="__main__":
oled.fill(0)
oled.show()
oled.text("Hello World!",0,0,1)
oled.show()
oled.pixel(10,20,1)
oled.hline(0,10,100,1)
oled.vline(120,0,30,1)
oled.line(10,40,100,60,1)
oled.rect(50,20,50,30,1)
oled.fill_rect(60,30,30,20,1)
oled.show()
time.sleep(2)
oled.fill(0)
oled.text("Hello World!",0,0,1)
oled.show()
time.sleep(1)
oled.scroll(10,0) #
oled.fill_rect(0,0,10,8,0)
oled.show()
time.sleep(1)
oled.scroll(0,10)
oled.fill_rect(0,0,128,10,0)
oled.show()
while True:
pass