How to add additional buttons?
#1
Question 
Hi everyone!

Like the post title states, I'd like to add more buttons to my CM3 build.  I don't need a fan or analog inputs, so the add-on board seems to be overkill.  From studying pictures of the add-on board, it looks like buttons are hooked up like this:

GPIO         button           GND

This assumes internal pullup resistors in the chip for each GPIO.  Can someone confirm this?

Also, am I missing something else, like hardware debouncing?
Reply
#2
Hello,
Your wiring is correct, please note that you can use GPIO40-43 but also pads under the Compute Module (35-39 I think).
GPIO 44-45 are used for I2C1.

You will just need to edit the driver config file to add the new inputs : /etc/modprobe.d/mk_arcade_joystick.conf
The pullup registers are set by the driver when it start.
Reply
#3
Thank you Porcinus!
Reply
#4
Hey iron_swan! Did you get it working the way you wanted?

After you wire up buttons like you mentioned (GPIO button GND), then you would want to edit the /etc/modprobe.d/mk_arcade_joystick.conf file to add those GPIO in place of the "-1" entries in the GPIO line.

Is that what you've done?
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)