It seems
import picodisplay2 as display
width = display.get_width()
height = display.get_height()
display_buffer = bytearray(width * height * 2) # 2-bytes per pixel (RGB565)
display.init(display_buffer)
is a somewhat different to:
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2`
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2)
to get where i current am, i have simply followed some examples for picodisplay 2 which work which use picodisplay2. But it seems picodisplay2 doesnt have set_font() or some other functions.
I guess, it seems the posted link above for documentation is for PicoGraphics module, and not picodisplay2
Also i cant even get a simple hello world working with the PicoGraphics module.
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2)
display.set_backlight(1.0)
display.set_pen(0, 0, 0)
display.clear()
display.update()
display.set_pen(255, 255, 255)
display.text("Hello World", 10, 10, 10, 2)
display.update()
when i run the above, i get:
>>> Running d:\repos\Personal\pyplay\main.py
♦Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'picographics'
So i think i may have the wrong uf2?? im using pimoroni-pico-v1.18.7-micropython.uf2
i know its a bit old, but i cannot get later versions working for some reason.