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

    Create Thread for animation?

    UIFlow
    3
    4
    4.3k
    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.
    • M
      mb
      last edited by

      Is it possible in UIFlow to create some kind of Thread to have a AtomMatrix LED animation running while a HTTP Request fetches a URL?

      Cheers
      Mike

      1 Reply Last reply Reply Quote 0
      • world101W
        world101
        last edited by

        You should be able to use timers and/or button callbacks for that. Without knowing exactly what you want to do, it’s hard to say. Give it a try and if you have issues, post your flow here.

        1 Reply Last reply Reply Quote 0
        • M
          mb
          last edited by

          My program needs to do a HTTP API request that takes about 10-20 seconds. During this time I would like to show a waiting animation updating every 1 sec.

          Would I use timers to implement this and set a global variable to stop the animation when the request is done?

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by

            Hi @mb

            yes, I suppose you could use a global variable, but timers also allow to be started and stopped. So you could start the timer with the animation, do the http request and when it's done stop the timer again.

            Cheers
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

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