mechanical switch to insert credits
-
Hi, I am not going to use retro pie in any commercial sites or situations but planning to add another layer of fun...
When I was playing Neo Geo emulators on PC before, I could map a key on the keypad to "insert coins", is it possible to connect a mechanical switch as shown below to the GPIO, when it is physically triggered, a credit will be "inserted" to the emulated game. If so, how can I do it?
Thanks in advance
-
@mrcola They are available from here. The system will generate a certain logic level for a coin insert depending on how you power it. This is equivalent to having a key press. With buttons, you have your common ground chain so when you press a button the switch effectively pulls the input to the controller down to 0V. With your own design for this, you may use the normally open or normally closed contacts depending on your design. By this I mean, you may want a logic 1, +5V to be fed into your controller (whatever it is) as opposed to a logic 0, 0V. Your problems will be connecting to the Pi GPIO. I am using a USB decoder (ipac2) for my button presses, so if I wanted a coin mech, I'd just wire it up to my chosen SELECT input (or keep the button for exiting and choose a spare) for the INSERT COIN feature. No need for GPIO. I'll assume though that you are using the GPIO for all your controller needs? If so, you would choose the GPIO pin that is currently used for SELECT.
If you look at this package, it is a driver for using the GPIO pins. You would use GPIO 9 in this example.
Also, look at http://blog.petrockblock.com/gadgets/controlblock-power-switch-game-controllers-and-io-for-the-raspberry-pi/ because this will allow you to do something similar.
Finally, If you read this, it's got a really nice tutorial on how to program the GPIO for arcade controls.
You will need to post more information about your setup before I can suggest further reading.
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.