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

    Interrupt routine for remote switch in UIFlow

    Scheduled Pinned Locked Moved UIFlow
    4 Posts 2 Posters 7.7k Views 1 Watching
    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 Offline
      Werner_G
      last edited by

      Putty, the walking robot can go forward or backwards. When walking, I cannot stop or switch direction using a remote switch, because I cannot interrupt the flow. An interrupt routine is needed I guess. I found examples for a H/W pin interrupt, but not for S/W. Can anyone please help me?

      0_1629196276245_puppy.png

      1 Reply Last reply Reply Quote 0
      • m5stackM Offline
        m5stack
        last edited by

        actually, we don't suggest putting the loop to the callback function. I think you could create a variable to save the current state, and then use the remote callback to change the state.

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

          Thank you. Don't understand what you suggest, but finally I got it working like this:
          0_1629374477997_puppy2.png
          Maybe you have better idea!

          m5stackM 1 Reply Last reply Reply Quote 0
          • m5stackM Offline
            m5stack @Werner_G
            last edited by

            @werner_g that's what I mean. haha. you did it.

            1 Reply Last reply Reply Quote 0

            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