![]() |
How to add additional buttons? - Printable Version +- Freeplaytech Forum (https://forum.freeplaytech.com) +-- Forum: Freeplay Zero / Freeplay CM3 / Game Pie Advance (https://forum.freeplaytech.com/forumdisplay.php?fid=24) +--- Forum: Freeplay Zero/CM3 (AKA GPA) Hardware (https://forum.freeplaytech.com/forumdisplay.php?fid=25) +--- Thread: How to add additional buttons? (/showthread.php?tid=4991) |
How to add additional buttons? - iron_swan - 07-22-2019 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? RE: How to add additional buttons? - Porcinus - 07-22-2019 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. RE: How to add additional buttons? - iron_swan - 07-22-2019 Thank you Porcinus! RE: How to add additional buttons? - Flavor - 07-27-2019 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? |