🤖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.

    Arduino
    2
    6
    2.5k
    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
      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
        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
          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
            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
              Steve1
              last edited by

              Thanks for your patience ;-)

              1 Reply Last reply Reply Quote 0
              • felmueF
                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
                • First post
                  Last post