christo1992
Posts: 3
Joined: Thu Aug 10, 2017 10:30 am

coin accpetor to start retropie

Thu Aug 10, 2017 10:34 am

hi all,

i have posted this on their site as well but i am unsure if they will be able to help me due to limitations of the software/operating system

i am wanting to create an arcade game box but a little different.. im wanting to be able to use multiple types of roms not just mame .

ive seen a lot of tutorials for coin acceptor for MAME but none of them will work with what im trying to acheive. i want to make the coin acceptor signal the rasbery pi 3 model b to run retropie.

i had thought of disabling auto boot of emulation station so it goes to the command prompt screen on bootup.. but i am unsure where to go from there.

i have seen tutorials where the coin acceptor gives pulses to the pi then gives the relevent commands e.g while true does this and that blah blah blah

i believe that principle would work with my plans but i am new to this area and unsure of what other coding is required and where i place the coding so when i put a coin in it gives a signal to run the command to start emulationstation.

i have done a lot of googling and havent found anything that i can really relate to that will help.

any suggestions as to how i do this? or any ideas that may work?

p.s sorry if this is hard to understand. im not very good and wording what im looking for

User avatar
karrika
Posts: 1125
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: coin accpetor to start retropie

Thu Aug 10, 2017 6:40 pm

The RetroPie automatic start is in /etc/profile.d/10-emulationstation.sh.

It is just a small bash script.

If you want to check for the coins you can edit the script to wait for the coins before it proceeds to launch the emulation station.

Basically the code could be something like:

Code: Select all

#!/bin/bash

/usr/local/bin/wait_for_coin
emulationstation

christo1992
Posts: 3
Joined: Thu Aug 10, 2017 10:30 am

Re: coin accpetor to start retropie

Sat Aug 12, 2017 4:51 am

thats what i was thinking but how will it know what to wait for exactly?

User avatar
karrika
Posts: 1125
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: coin accpetor to start retropie

Sat Aug 12, 2017 7:30 am

christo1992 wrote:
Thu Aug 10, 2017 10:34 am
i have seen tutorials where the coin acceptor gives pulses to the pi then gives the relevent commands e.g while true does this and that blah blah blah
The "wait_for_coin" program needs to be written to find out if the coin has been inserted. It is probably a while loop that exits when a coin is detected. As I don't know anything about the hardware you need to follow the tutorials you found to get this code written.

christo1992
Posts: 3
Joined: Thu Aug 10, 2017 10:30 am

Re: coin accpetor to start retropie

Sun Aug 13, 2017 10:38 am

ok thank you for your help. between me and a friend of mine who is a bit more clued on writing scripts will come up with something.

thanks again

Return to “Gaming”