My main question at the moment is about a starting point. I am wanting to attempt making a usb game controller with dual analog stick which click, a d-pad, and 19 buttons. One analog stick would be used for a mouse and three of the 19 buttons would be used towards that respective functionality.
Wandering if this is possible with just one board to control all of this, or would a second board be needed? Also any input on which of the various options might be best suited for such project would be greatly appreciated.
19+ button game controller assitance request
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- zidamouge
- Posts: 2
- Joined: Thu Jun 14, 2018 5:44 pm
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: 19+ button game controller assitance request
Totally cool, I love this project. An M0-based Metro or Feather would be a good starting point, as they can do USB HID keyboard and mouse to send the commands to your PC (if that's what you're hooking this up to). As you know, the rest is about figuring out how many analog and digital input pins you need and how to get a board to read those.
Analog inputs = 4 because you have two joysticks and you need one analog input per axis, per joystick.
Digital inputs:
Joystick click (1 button per joystick) = 2
D-pad = 4
other buttons = 19
total = 25 digital io
A Feather M0 Basic Proto board has 6 analog inputs (which can also be used as digital IO), and 14 pins that can be used as digital IO (this includes the RX/TX, SDA/SCL, SCK/MOSI/MISO pins so long as you aren't using them). So, if you steal two of the available analog pins you now have 16 available digital pins. We come up 9 pins short! But, fear not ---
You can add an Adafruit seesaw board for expanding your available GPIO. https://www.adafruit.com/product/3657 It connects to the Feather over I2C, which means you'll take back the SDA/SCL pins we previously stole. So, now you have 14 digital pins on the Feather, plus 13 added GPIO seesaw pins. Total: 27 pins! We have two to spare!
I've used seesaw a bit for this exact purpose and it works great. In fact, the seesaw is what's embedded in our Crickit robotics board to do this type of port expansion and more. I haven't done anything with this many inputs, so you will have some testing and experimentation to do -- but I think this is a good combo for what you want to do. Also, a Feather Doubler or Terminal Block FeatherWing may be helpful for wiring things up.
Analog inputs = 4 because you have two joysticks and you need one analog input per axis, per joystick.
Digital inputs:
Joystick click (1 button per joystick) = 2
D-pad = 4
other buttons = 19
total = 25 digital io
A Feather M0 Basic Proto board has 6 analog inputs (which can also be used as digital IO), and 14 pins that can be used as digital IO (this includes the RX/TX, SDA/SCL, SCK/MOSI/MISO pins so long as you aren't using them). So, if you steal two of the available analog pins you now have 16 available digital pins. We come up 9 pins short! But, fear not ---
You can add an Adafruit seesaw board for expanding your available GPIO. https://www.adafruit.com/product/3657 It connects to the Feather over I2C, which means you'll take back the SDA/SCL pins we previously stole. So, now you have 14 digital pins on the Feather, plus 13 added GPIO seesaw pins. Total: 27 pins! We have two to spare!
I've used seesaw a bit for this exact purpose and it works great. In fact, the seesaw is what's embedded in our Crickit robotics board to do this type of port expansion and more. I haven't done anything with this many inputs, so you will have some testing and experimentation to do -- but I think this is a good combo for what you want to do. Also, a Feather Doubler or Terminal Block FeatherWing may be helpful for wiring things up.
- zidamouge
- Posts: 2
- Joined: Thu Jun 14, 2018 5:44 pm
Re: 19+ button game controller assitance request
Awesome and thank you. I think i will give that protoboard a shot and try that with the seesaw thing. I get to do some more studying while i wait. Thanks again and i guess i could post some stuff as it progresses, depending on remembering and expediency of the progress.
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: 19+ button game controller assitance request
Yes, please do, we'd love to see progress info as you go!
Please be positive and constructive with your questions and comments.