Micropython/LVGL API docs/guides?

Hi all,

I’m working with the lv_micropython repo, I have built it successfully, and done some light work on my m5stack Core2 device (ILI9342 & FT6336), so far so good. For my project, I’m wanting to make a menu system, and knowing what functions and objects I have to work with is the next step. I’ve seen the examples directory in the github repo, but am wondering if there is a better documentation source than what’s on docs dot lvgl io (I’m blocked from posting with hostnames, it seems). It seems that’s geared more for the C crowd, and certain things like button events and such aren’t really documented there.

Perhaps it’s more just look at the source and wing it, but wondering what other resources/tools are available so that I can further understand the lvgl ecosphere, how is best to use it with micropython, etc.

1 Like

Hi @aseelye!

See: MicroPython examples for V7?

Your resources are:

Also, keep in mind that the Micropython Bindings are automatically generated from the LVGL C API. So once you see a few examples it’s usually pretty simple to look at the C API and understand how it translates into Micropython.

And if you have any questions - just send them here in the forum!

Thank you. I’ve looked through there, there seems to be nearly ample examples to what I figure would be common usage.

One thing is eluding me so far though. Are there any boilerplate examples of something that would show a basic status page, and then a config/settings page or two? I can certainly think of how I’d hack it together, but not sure if I should create a new screen for each page and scuttle the rest of them each time I move from one page to another (and dynamically re-create when going back), or something else. Perhaps this should be another topic, but I’d rather not wade in here and start cluttering up the board with topics if that’s not the right thing to do.

I’m not aware of such Micropython boilerplate examples.
There might be C examples, you could ask on “How-To” category on a separate post.
If you create such example - please consider opening a PR and contributing it back to LVGL!

That depends on the board you are using, performance requirements, RAM etc.
If you have enough RAM you can certainly create all screen in advance and only switch between them. If not, you can delete and re-create widgets on the fly. It’s really depends on your use case.

If a question is not specific to Micropython, it’s better to send another post on a different category so it would reach a wider audience.