Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Capacitive touch for coin slot

    GamePad/GPIO/USB encoder
    capacitive touch coin slot
    2
    6
    2480
    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.
    • mc9625
      mc9625 last edited by

      I'm trying to use the AT42QT1010 capacitive touch module. The inspiration came from here: https://elecdrome.com/icade-raspberry-pi-mod/
      But I can't understand how I should wire the module to the GPIO. I've used the ground and GPIO21 as described in the recalbox wiki for GPIO controller, but probably I still miss something.

      1 Reply Last reply Reply Quote 0
      • Substring
        Substring last edited by

        A link to the module you're refering to would have been quite appreciated. But I guess you simply need to wire it between and GND and the SELECT pin for P1 or P2. But your controllers need to be wired on GPIO, you can't mix a pad with this

        Former dev - Please reply with @substring so that i am notified when you answer me
        Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

        1 Reply Last reply Reply Quote 0
        • mc9625
          mc9625 last edited by

          this is the product
          https://www.adafruit.com/product/1374

          1 Reply Last reply Reply Quote 0
          • Substring
            Substring last edited by

            too long to read. Let me tell you how the GPIO driver works : it expects the GPIO button pin to be grounded to say "button pushed", and on Hi Z/open to say "button not pressed". I didn't take time to read the full doc to see how your button says "pushed". Can you check by yourself ?

            Former dev - Please reply with @substring so that i am notified when you answer me
            Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

            1 Reply Last reply Reply Quote 0
            • mc9625
              mc9625 last edited by

              You are absolutely right! Actually it seems non that easy to find info about this item. Anyway this is a description of how it works:
              "As long as a touch (e.g. from a finger) is detected, the AT42QT1010 keeps the output line high. Otherwise, the line is kept low. You just need to provide a power source (1.8V - 5V) and ground for the AT42QT1010 to work."

              In the project that inspired me, the author says:
              "Since the cap-touch sensor (connected to GPIO23) is active-high, the code needed to interpret it differently since all the other GPIO inputs are active-low. Otherwise, the coin-drop will constantly retrigger. Replace line 226 with the following code:

              if (io[i].pin == 23)
              pinConfig(io[i].pin, "active_low", "1");
              else
              pinConfig(io[i].pin, "active_low", "0"); // Don't invert"

              Of course it refers to Adafruit retrogame.c but I hope that makes sense for you anyhow.

              Thanks.

              Massimo

              1 Reply Last reply Reply Quote 0
              • Substring
                Substring last edited by

                Ok, but the GPIO drivers expect the pin to be grounded, not at Vcc. So you'd need some more electronics

                Former dev - Please reply with @substring so that i am notified when you answer me
                Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

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

                Want to support us ?

                51
                Online

                98.6k
                Users

                28.1k
                Topics

                187.0k
                Posts

                Copyright © 2021 recalbox.com