Hello
I have compiled lvgl_micropython with this line:
python3 make.py esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=ILI9341 INDEV=XPT2046 USER_C_MODULE=${MODUL_EIGENMATH}/eigenmath.cmake
I execute this code:
def hello():
_WIDTH = const(320)
_HEIGHT = const(240)
_RST = const(14)
_DC = const(9)
_MOSI = const(11)
_MISO = const(13)
_SCK = const(12)
_HOST = const(1) # SPI2
_LCD_CS = const(10)
_LCD_FREQ = const(40000000)
_TOUCH_CS = const(15)
_TOUCH_FREQ = const(10000000)
spi_bus = machine.SPI.Bus(
host=_HOST,
mosi=_MOSI,
miso=_MISO,
sck=_SCK
)
display_bus = lcd_bus.SPIBus(
spi_bus=spi_bus,
freq=_LCD_FREQ,
dc=_DC,
cs=_LCD_CS,
)
display = ili9341.ILI9341(
data_bus=display_bus,
display_width=_WIDTH,
display_height=_HEIGHT,
reset_pin=_RST)
display.set_power(True)
display.init()
th = task_handler.TaskHandler()
scrn = lv.screen_active()
scrn.set_style_bg_color(lv.color_hex(0x000000), 0)
slider = lv.slider(scrn)
slider.set_size(300, 50)
slider.center()
label = lv.label(scrn)
label.set_text('HELLO WORLD!')
label.align(lv.ALIGN.CENTER, 0, -50)
but I get this error:
import opening
opening.hello()
Traceback (most recent call last):
File “”, line 1, in
File “opening.py”, line 50, in hello
File “display_driver_framework.py”, line 459, in init
ImportError: no module named ‘_ili9341_init’
line 50 is : display.init()
and $ wc -l display_driver_framework.pyi
299 display_driver_framework.pyi
display_driver_framework.py is 299 lines, it has no 459 line.
please help …