RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    can udev read i2c and hardwired GPIO buttons simultaneously?

    Scheduled Pinned Locked Moved Help and Support
    wiii2cretropie 4.4retroarchjoypad config
    4 Posts 2 Posters 654 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.
    • K
      krullbeast
      last edited by

      I'm trying to create a joypad similar to a classic nes controller to work in retroarch. I want to use a wii nunchuck for the joystick and select and start buttons and also have two buttons hardwired to the raspberry pi 3b running retropie 4.4

      i finally got the nunchuk to send other data than 255, it seemingly is working including the c and z buttons. my A and B buttons are wired to specific GPIOs.

      Is it possible to create a joypad from this setup to be able to play games in retropie? or is it not possible?

      thank you for any advice!

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @krullbeast
        last edited by

        @krullbeast You can try to see if any of the GPIO based modules for joypads works for your setup - https://retropie.org.uk/docs/GPIO-Modules/. But if you only have the A/B buttons wired to the GPIO it might now work - insufficient buttons.
        Othwise, you'll need to create your own virtual keyboard - similar to how https://github.com/adafruit/Adafruit-Retrogame works.

        K 1 Reply Last reply Reply Quote 0
        • K
          krullbeast @mitu
          last edited by

          @mitu thank you!
          i'll try the gamecon advice and see what happens. do you think it is possible to read the i2c data and also the A and B buttons inside of retroarch?

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @krullbeast
            last edited by

            @krullbeast said in can udev read i2c and hardwired GPIO buttons simultaneously?:

            do you think it is possible to read the i2c data and also the A and B buttons inside of retroarch?

            Not an expert on this, but I think RetroArch doesn't read directly from GPIO (I2C or otherwise), instead it uses an established input driver (udev/sdl/etc.) - https://github.com/libretro/RetroArch/tree/master/input/drivers.

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

            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.