Controller Help
  • Hi guys

    So just finished the prelim build and have all my joysticks and buttons all wired up.

    Followed this configuration minus the coin button (hoping i can use a combination of other buttons to cover the credits).
    https://github.com/ian57/Raspicade-configuration-files/blob/master/Raspicade-Retrogame-2Player-BPlus/README.md

    So fired it up and hit the tab button to configure the buttons but but when i press the buttons it causes the RPI to reboot. On the upside i guess at least its registering button clicks but still not working correctly. Went back and checked ground cables and all the other wiring but seems okay. Can anyone out there think of something i might have missed?

    Any advice would be greatly appreciated.

    Thanks

    tSm
  • it sounds to me like you have something wired wrong and you have 2 non-ground wires connecting
  • Thanks mholgatem. So had another look over and discovered that I had all the grounds daisy chained together rather than a daisy chained loop for each player. Fixed that but still the same problem (reboot on button press). I assume the order of the buttons connected to the ground makes no difference. Can't see any dodgy connections. Hmm whet to now... There are 3 tabs on each button. The one that lays flat seems to be the ground in the wiring diagram, the other two I'm using the top one, should I not be?

    Thanks for the help.
  • If you have 3 tabs, then chances are that they are 'contact on open', 'contact on close', and 'ground'. Contact on open, will mean that the button is making the circuit when it's not being pressed. contact on close will mean that the button works like a regular button, completing the circuit when it's pressed. So you may try switching them to the other tab? It doesn't explain why it would only mess up when you pressed a button though.
  • Cool that makes sense, changing tabs is worth a try I guess.
  • Okay so rather than trying those different tabs i thought i'd try using a multimeter to see if there was current making it to the breakout board. Got 5v between one of the 5v pins and a button so thats all good, i know the breakout works. Then thought i'd try to use a wire to connect a ground to a button on the breakout see if i get the same problem as pressing a button. Did that and pretty sure that slipped and touched a terminal next to it now the pi wont boot up, the red light is on but nothing, piplay wont come up, nothing comes up. Could i kill the pi by connecting two of the wrong GPIO pins together (eeeeek)?
  • So got back onto this today and thought that'd rather than disconnect and reconnect everything i'd make a small tester with a battery and globe. Going through each of the buttons and connecting them to ground and button and the light comes on when the button is pressed or joystick moved. Works a treat and everything seemed to work fine.

    Next step i got rid of the controllers completely and connected a jumper cable to the ground and the other where the button should be and touched the two together, voila reboot. So exactly the same thing I'm getting with my controller.

    One thing that could be a problem, when i type "make". I get the error (well i think its an error or not the right thing anyway):
    make: Nothing to be done for 'all'.

    I assume this is stumbling at the first hurdle? Should i be typing in something different?

    Thanks
  • When you get the output 'Nothing to be done for all', that means that there have been no changes made to the target file and everything is already up to date. Have you made sure that the program is running? it is a modified version of retro game. so you should be able to run the app with sudo ./retrogame (or whatever it is named). Also, are all of your pins connected the same way that is listed in the code? if not, then some of them may still be set to their defaults, which could be 5v going to ground and causing the reboot.
  • Will look into that, thanks for the help mholgatem.

    Out of interest and on a similar note I've been playing around with VNC viewing, is there a simple shell command i can use to see what scripts are running in the background (I'm sure there is, will go looking)?

    Thanks again
  • BTW to answer your question my pins are all configured the way the wiring diagram shows, not the same way as the code or it would be it would be 5v going to ground as per.
    GPIO 02 -> KEY_UP // Up (says this in the tutorial, but GPIO 02 is actually a 5V pin)
    GPIO 03 -> KEY_UP // Up (shows this in the wiring diagram)

    I assume that the labeling is off and the code is using pins going down one side then down the next in columns, rather than the actual number which goes right left right left.

    So the way I've been connecting is the 1UP controls down the left side of the GPIO and the 2UP down the right. Is this not right? Do in need to change the code perhaps? If so is that a matter of adjusting the retrogame.c file?

    Hope that makes sense, hard to explain in text.

    Cheers
  • @TheStrayMongrel, I use htop to view processes in command line.
    sudo apt-get install htop then just type 'htop' to run it. It gives tons of good info.

    Ok, so here is a confusing bit of info, that took me a while to figure out on my own.
    GPIO 02 and PIN 2, are 2 different things. GPIO 02 is actually PIN 3, PIN 2 is the 5v.

    check this


  • Excellent, cheers for the info. Will keep pushing forward.
  • Installed htop, nice one, thanks.

    So ran ./retrogame and sits there as though its running. I assume i can run ./retrogame & so as to free up the command line to fired up Piplay? I did actually just type "exit" after launching retrogame and Piplay fired up (hopefully thats not killing off retrogame prior to launch)? Once it started connected up the two wires (ground and button 4) and touched... reboot.

    Also had a look through the code to see if anything was amiss and all seems good, have not adjusted anything.

    Was suggested I look into this as an alternative, might try that soon.
    https://github.com/DigitalLumberjack/mk_arcade_joystick_rpi
  • If you have a Pi2, please use the last release of my retrogame program : https://github.com/ian57/Raspicade-Retrogame-2Player-Pi2

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!