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

    MPaper: How to read touch (or fingerUp) just one time.

    Scheduled Pinned Locked Moved Arduino
    6 Posts 2 Posters 4.6k 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.
    • S Offline
      Steve1
      last edited by Steve1

      I am programming my M5Paper with the Arduino IDE 2.2.1. I have tried everything I can think of to get just a single pair of x,y cordinates from a single touch on the M5Paper. I have tried comparing new coordinates with old and so on, but I haven't been able get just a single pair of coordinates and then wait for the net touch. Could someone show me how to achieve this?

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

        Hello @Steve1

        doesn't this example work for you?

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 1
        • S Offline
          Steve1
          last edited by

          Well, yes it does. But why does the readFinger() have to be reaad three times?

          for(int i=0;i<2; i++){
          tp_finger_t FingerItem = M5.TP.readFinger(i);

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

            Hello @Steve1

            actually it is only read twice (once for i = 0 and a second time for i = 1). The reason is that the touch screen can handle more than one touch point at the same time.

            Thanks
            Felix

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

            1 Reply Last reply Reply Quote 1
            • S Offline
              Steve1
              last edited by

              Thanks for your patience ;-)

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

                Hello @Steve1

                you are very welcome.

                Thanks
                Felix

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

                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