MicroPython
-
Good morning everyone,
I am here to see if I can solve this problem since I do not know if the libraries used by M5stack are out of date since I try to use elements provided by M5stack and when I go to implement them in the code I get many errors that are not mine.
Attached page of the examples that if they are good but they are not complete:
Here you will find several examples but there is no event code.
I see that M5stack core 2 with micropython is adapted with the library 'lvgl' attached guide page:
I observe different examples where I can only rescue some examples that work but others do not work since the libraries are not complete in my opinion, I attach examples that I provide but they do not work and they are:
EXAMPLES PAGE:
SIMULATOR:
https://sim.lvgl.io/v8.1/micropython/ports/javascript/index.html?script_startup=https://raw.githubusercontent.com/lvgl/lvgl/71e6f65d519443b2c72a4b1b0b495dcfbc0fc91f/exadersader/exader/exader/examples/ //raw.githubusercontent.com/lvgl/lvgl/71e6f65d519443b2c72a4b1b0b495dcfbc0fc91f/examples/widgets/chart/lv_example_chart_1.pyCHART:
- https://docs.lvgl.io/master/widgets/extra/chart.html?highlight=chart
- https://github.com/lvgl/lvgl/blob/71e6f65d519443b2c72a4b1b0b495dcfbc0fc91f/examples/widgets/chart/lv_example_chart_6.py
When wanting to use these examples it says that the library does not exist, then I go to the program m5burn version 2.4.2 and I have the version of micropython 1.8.4 core2, I would like to know please what I have to do so that no error of the examples that appear there I did not go out again.
Thank you very much Community.
-
Hey good afternoon
I am trying to use also the LVGL and its charts on the Core2.
I have the version 1.9.2 installed.I have created an example, which should work.
The API documentation i have linked, documents other functions as implemented.import lvgl as lv
chart = lv.chart(lv.scr_act())
chart.set_size(200, 150)
chart.set_type(lv.chart.TYPE.LINE) # Line Modechart.set_point_count(20)
chart.set_y_range(lv.chart.AXIS.PRIMARY_Y,0,120)
chart.set_style_local_line_width(lv.chart.PART.SERIES,0,1) #Line Width of Dataserie 0
chart.set_style_local_size(lv.chart.PART.SERIES,0,1) # Point Widthser1 = chart.add_series(lv.color_hex(0x000000)) # Add data serie
chart.set_next(ser1,1) # Set next points on ser1
chart.set_next(ser1,2)
chart.set_next(ser1,10)
chart.set_next(ser1,10)
chart.set_next(ser1,10)
chart.set_next(ser1,10)
chart.set_next(ser1,10)
chart.set_next(ser1,30)
chart.set_next(ser1,70)
chart.set_next(ser1,110)Late response, i know, but i hope it helps you.
Best regards