CircuitPython with Pico 2 W

This initializes the screen (it’ll show the REPL if you hit STOP in Thonny)

from fourwire import FourWire
from adafruit_ili9341 import ILI9341 # https://circuitpython.org/libraries
from busio import SPI
import digitalio

spi = SPI(clock=board.GP10, MOSI=board.GP11, MISO=board.GP12)

if not spi.try_lock():
   print("Failed to lock SPI bus")
   return

spi.configure(baudrate=40000000)
spi.unlock()

tft_cs = board.GP13
tft_dc = board.GP14

display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs,reset=board.GP15)
               
fb_display = ILI9341(display_bus, width=320, height=320, rotation=270)

That comes from:

I wish I saw this like 4 hours ago :sweat_smile: I ran into the same keyboard issue, which to my current understanding is a bit odd because a similar I2C setup in micropython works just fine.

CircuitPython seems better for memory management and I love its file system, but honestly, the Adafruit libraries (mainly the graphic ones) aren’t that good compared to the MicroPython ones.

I also see that some developers have already created some MicroPython drivers for the PicoCalc so I’m discontinuing CircuitPython support in Picoware for now.

If anyone figures out the keyboard in the future, certainly tag me

Here’s a Draw class that handles graphics:

Image class

Keyboard

1 Like