from machine import Pin, I2C
import ssd1306
import time
# I2C setup (GP2 = SDA, GP1 = SCL for Raspberry Pi Pico)
i2c = I2C(0, scl=Pin(21), sda=Pin(22), freq=400000)
# OLED setup (128x64 pixels, address 0x3C)
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
# Clear the screen
oled.fill(0)
# Show a fun message
oled.text("Hello Coders", 0, 20)
oled.text(":)", 60, 40)
oled.show()
# Keep it displayed
while True:
time.sleep(1)