Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. WoeTan
    3. Posts
    W
    • Continue chat with WoeTan
    • Start new chat with WoeTan
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by WoeTan

    • RE: MicroPython

      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

      posted in Core 2
      W
      WoeTan
    • m5list on Core2

      Hi there.

      I am trying to use the m5list on the Core2.
      I am using the following Micropython code

      (Sorry, I did not get to post as a 'real' code snippet)

      from m5stack_ui import M5List
      lGraph = M5List(0,0)
      h1 = lGraph.add_label('PT1')
      h2 = lGraph.add_label('PT2')
      lGraph.get_sel_label_index()

      Depending on what is selected, I could retrieve the selection with

      lGraph.get_sel_label_index()

      So, I get 0 or 1.
      So far so good.
      When nothing is selected, that means the display was touched somewhere not within the list or when the list was created and it was not clicked on a list item, then the function does not return any thing and blocks the Core2 until a manual reset occurs.
      Could you please help me to avoid this behaviour?
      Thank you

      posted in Core 2
      W
      WoeTan