# 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
pico:GP0
pico:GP1
pico:GND.1
pico:GP2
pico:GP3
pico:GP4
pico:GP5
pico:GND.2
pico:GP6
pico:GP7
pico:GP8
pico:GP9
pico:GND.3
pico:GP10
pico:GP11
pico:GP12
pico:GP13
pico:GND.4
pico:GP14
pico:GP15
pico:GP16
pico:GP17
pico:GND.5
pico:GP18
pico:GP19
pico:GP20
pico:GP21
pico:GND.6
pico:GP22
pico:RUN
pico:GP26
pico:GP27
pico:GND.7
pico:GP28
pico:ADC_VREF
pico:3V3
pico:3V3_EN
pico:GND.8
pico:VSYS
pico:VBUS
Loading
ssd1306