from machine import Pin, I2C
import ssd
# Initialize I2C on pins 21 (SDA) and 22 (SCL)
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
# Check if any I2C devices are connected
devices = i2c.scan()
if devices: # if at least one device is found
oled = ssd.SSD_I2C(128, 64, i2c)
while True:
oled.fill(0) # clear screen
oled.text("Hello World!", 10, 10)
oled.show()
else:
print("No I2C device found!")