It’s excited to see the development of the LVGL moving forward so quickly, however it’s a pity that there’s still no examples for MicroPython for V7, any plans? I remember seeing somewhere that the V8 is soon to be released, any timeline? Just don’t leave us MicroPython users behind!
Hi,
While the examples Amir pointed you to, are ports from C to Python of the examples in the lv_examples repository, I am about to port further examples which I upload to https://github.com/uraich/lv_mpy_examples.
For the moment there are 4 examples which I want to run on the LiliGo t-watch 2020. You find them in the folder t-watch_examples. Then I am working on demos that were originally written for the ST7735 driver, which I also port to lvgl. You find a graphics_demo under st7735_demos. All these examples also work on the lvgl unix port
I had been working on an IoT course for the University of Cape Coast, Ghana, for which I ported the demos originally written for the ssd1351 controller to the st7735.
Now I try to port them to lv_micropython. These examples are quite a bit bigger and more evolved such that they don’t fit into lv_examples. If interested, here they are: https://github.com/uraich/lv_mpy_examples/tree/main/st7735_demos
This is still “work in progress” and you may expect a few more demos being uploaded in the coming weeks.
In some of the python examples, there’s a line of code: from lv_colors import lv_colors, but when I tried to import it in REPL, it threw an error: ImportError: no module named 'lv_colors'
This topic has been incredibly helpful to me as well, I was not aware of the examples in the GitHub repo and am looking forward to when they can be incorporated into the docs.
Going out on a limb here but has anyone converted the printer demo (from here: https://www.lvgl.io/demos ) to micropython?
I was feeling ambitious so have been giving it a go, running into an issue though.
Going through the c code there are many uses of LV_EVENT_CB_DECLARE and I am not sure how to apply these in micropython (this could just be lack of c knowledge). Any pointers on how to do this?
I know, there are a few demos I have not ported and the printer demo is one of them.
LV_EVENT_CB_DECLARE are just type declarations in C and since in Python you do not declare types …
Have a look at the btn examples to see how to implement callbacks