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

    m5list on Core2

    Core 2
    m5list core2 micropython
    1
    1
    3.0k
    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.
    • W
      WoeTan
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post