Retrogame - Pin config failed

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
Ayeso
 
Posts: 4
Joined: Fri Sep 05, 2014 11:30 am

Retrogame - Pin config failed

Post by Ayeso »

Hello, hoping someone else would have had this issue before me.

Im working on making a piboy/pigrrl gameboy. Im using a new B+ so I had to redesign the case. Everything fits nicely and ill post pictures later. However, my issue is more with the software. I ran across multiple issues and resolved them getting the B+ to work since the cupcade image does not support B+ yet. everything is now working correctly, gamera launches correctly, I can play games using a keyboard etc..

However, retrogame does not seem to want to work. If I run the command, Sudo retrogame & I get an error "Pin config failed"

I initially though maybe my gpio/wiring was off, however I triple checked all the wiring and everything is wired to the correct pins. I then verified the retrogame.c has the correct pinout setup for the B+ and all the GPIO outputs match what I have them wired to.

I then wrote a simple script to test that the pi can read the buttons and the buttons are working, and this works just fine. I press a button and get a message button X was pressed.

It seems like retrogame is having an issue reading the button inputs, any ideas?

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Retrogame - Pin config failed

Post by pburgess »

retrogame is automatically run at startup; most likely you're encountering interference from that and a second instance you're trying to run.

Hunt down the background process using 'ps' and 'kill', then try running your version.

Alternately, 'make install' and 'sudo reboot', and your modified version should be running in the background.

User avatar
Ayeso
 
Posts: 4
Joined: Fri Sep 05, 2014 11:30 am

Re: Retrogame - Pin config failed

Post by Ayeso »

Perfect, ill give that a try, but Im not sure thats the case. I originally didnt have retrogame at boot due to having to remake the "cupcade" image to work with the B+. That step wasnt listed in the how to but I stumbled across mention of it and dug up the files from the cupcade image.

Reason I was trying to run it is because the buttons arent working in gamera so I thought it might be an issue with the config.

Once Im all done with everything ill post up how I got everything working on the B+

User avatar
Ayeso
 
Posts: 4
Joined: Fri Sep 05, 2014 11:30 am

Re: Retrogame - Pin config failed

Post by Ayeso »

No progress unfortunately, still get the same error message. I checked and retrogame is not running at all, probably due to the error.

I tested again and same issue. However it seems to be failing on the edge detection portion for GPIO 22 as I had it print out where in the loop it is. I checked the soldering and it looks fine. I am going to resolder it and verify that everything is connected as expected.

To test I removed GPIO 22 from the script and it no longer errors out. However, it still doesnt work in gamera.


root@raspberrypi:~# /sys/class/gpio/gpio2/active_low .
/sys/class/gpio/gpio2/direction .
/sys/class/gpio/gpio2/edge .
/sys/class/gpio/gpio3/active_low .
/sys/class/gpio/gpio3/direction .
/sys/class/gpio/gpio3/edge .
/sys/class/gpio/gpio4/active_low .
/sys/class/gpio/gpio4/direction .
/sys/class/gpio/gpio4/edge .
/sys/class/gpio/gpio17/active_low .
/sys/class/gpio/gpio17/direction .
/sys/class/gpio/gpio17/edge .
/sys/class/gpio/gpio27/active_low .
/sys/class/gpio/gpio27/direction .
/sys/class/gpio/gpio27/edge .
/sys/class/gpio/gpio23/active_low .
/sys/class/gpio/gpio23/direction .
/sys/class/gpio/gpio23/edge .
/sys/class/gpio/gpio18/active_low .
/sys/class/gpio/gpio18/direction .
/sys/class/gpio/gpio18/edge .


Here is it failing.

root@raspberrypi:~/Adafruit-Retrogame-master# /sys/class/gpio/gpio2/active_low .
/sys/class/gpio/gpio2/direction .
/sys/class/gpio/gpio2/edge .
/sys/class/gpio/gpio3/active_low .
/sys/class/gpio/gpio3/direction .
/sys/class/gpio/gpio3/edge .
/sys/class/gpio/gpio4/active_low .
/sys/class/gpio/gpio4/direction .
/sys/class/gpio/gpio4/edge .
/sys/class/gpio/gpio17/active_low .
/sys/class/gpio/gpio17/direction .
/sys/class/gpio/gpio17/edge .
/sys/class/gpio/gpio27/active_low .
/sys/class/gpio/gpio27/direction .
/sys/class/gpio/gpio27/edge .
/sys/class/gpio/gpio22/active_low .
/sys/class/gpio/gpio22/direction .
retrogame: Pin config failed. Try 'sudo retrogame'.

User avatar
Ayeso
 
Posts: 4
Joined: Fri Sep 05, 2014 11:30 am

Re: Retrogame - Pin config failed

Post by Ayeso »

So, I got it fixed.. I remade the img from scratch since I knew the steps that are missing from the tutorial and it wouldnt be me mucking around and guessing a ton, now it seems to work! no idea what I did different!

*edit

The only difference I can think of is instead of noobs I used the base raspian image and didnt make any config changes.

User avatar
rw58
 
Posts: 1
Joined: Sun Nov 16, 2014 8:31 pm

Re: Retrogame - Pin config failed

Post by rw58 »

Any chance you can post your .STL files for the B+?

Thanks!

User avatar
alansnow18
 
Posts: 1
Joined: Thu Jan 01, 2015 3:04 am

Re: Retrogame - Pin config failed

Post by alansnow18 »

Could you post your image of cupcade that works with the B+. Or instructions on how you got yours to work?

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”