Hello everybody.
I’m using the pi pico (rp2040) with an ILI9341+XPT2046 display. I compiled an image from GitHub-lvgl/lv_micropython
I used the generic drivers (from lv_binding_micropython/…/driver/generic) to execute
ili9xxx-test.py and xpt2046-test.py. It worked OK. The display and touch worked.
I’m new to all this.
How do I use LVGL now? with these two drivers ili9xx.py and xpt2046.py.
Do you have a basic example of a button with Hello World?
drivers location: \lv_micropython\lib\lv_bindings\driver\generic
Below is my main.py, what’s missing for it to work?
The screen goes white.
The hardware is ok (tested).
import utime
from machine import SPI, Pin
from ili9xxx import Ili9341_hw
import lvgl as lv
utime.sleep(3)
lv.init()
spi = SPI(
0,
baudrate=24_000_000,
sck=Pin(18),
mosi=Pin(19),
miso=Pin(16),
)
lcd = Ili9341_hw(spi=spi, cs=21, dc=17, rst=20)
screen = lv.obj()
button = lv.button(screen)
button.center()
label = lv.label(button)
label.set_text(“Hello World!”)
label.center()
lv.screen_load(screen)
check the j1 jumper state behind your board, make that short and power the board with 5v, this worked for me