# Initialize the display using displayio and draw a text message.

# use in wokwi simulation: https://docs.wokwi.com/guides/circuitpython

# Learn more:
# https://learn.adafruit.com/adafruit-oled-featherwing/python-circuitpython-wiring
# https://learn.adafruit.com/adafruit-oled-featherwing/python-usage
# https://docs.circuitpython.org/projects/ssd1306/en/latest/
#
import board
import busio
import displayio
import terminalio
from adafruit_display_text import label
import adafruit_displayio_ssd1306

# (re)initialize the display bus
displayio.release_displays()

# define the pins to be used for i2c communication:
i2c = busio.I2C(scl=board.GP3, sda=board.GP2)
display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)

# declare the display:
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)

# Make the display context
splash = displayio.Group()
display.show(splash)

# Draw label
text = "Hello World!"
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00, x=28, y=15)
splash.append(text_area)

while True:
    pass

$abcdeabcde151015202530354045505560fghijfghij
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT