from machine import Pin, I2C
import ssd1306
from machine import Pin, I2C
import ssd1306
import time
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
x, y = 0, 32
dire = 1
while True:
oled.fill(0)
oled.pixel(x, y, 1)
oled.show()
x = x + dire
if x == 127 or x == 0:
dire *= -1
time.sleep(0.05)