🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    MicroPython

    Scheduled Pinned Locked Moved Core 2
    2 Posts 2 Posters 4.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      nicolai
      last edited by

      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:

      • https://docs.m5stack.com/en/mpy/display/m5stack_lvgl

      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:

      • https://docs.lvgl.io/master/examples.html

      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:

      • https://docs.lvgl.io/master/examples.html

      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.py

      CHART:

      • 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.

      1 Reply Last reply Reply Quote 0
      • W Offline
        WoeTan
        last edited by

        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 Mode

        chart.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 Width

        ser1 = 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

        1 Reply Last reply Reply Quote -1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post