GPioneer - A side project compatible with PiPlay
  • Well done @mholgatem great idea. No one knows better than you the problems encountered when trying to get the GPIO based joysticks/buttons working (I alone have been harassing you with no end of questions and troubleshooting advice!). Now that I've got my controller working pretty darn well though I'm reluctant to switch, though probably will at some point. Would be interested to hear how people go and what they think.

    Keep up the good work mate.

    tSm
  • Thanks. I've just been enjoying the fact that I can now control volume and I have about 5 games that I can auto launch with the press of a button.
  • Oooooow, control volume. I'd like that. Would it be hard to move from one to the other (and back if something breaks)?

    The flexibility of it sounds great in lieu of all the basic functions on mine working but anything secondary doesnt.

    Might even be a workaround to that tab problem I'm having on the keyboard.
  • Yeah, it's really easy to switch around because it doesn't really install anything that piplay doesn't already install. Are you running Adafruit's Retrogame utility currently?
  • Excellent, will give it a go when i get a chance and see how it goes. Thanks very much.
  • Okay so fired this up. Installed and ran the config tool which all seemed to go well. I set the select button to to button 1 but that doesnt seem to work in the Pi Play menu or within Advance Mame (when i navigate there with the keyboard). Left, right, up and down work fine in the Pi Play menu i should probably add. Have I forgotten something, or do i now need to go and adjust the advmame.rc? Thanks
  • Would also be interested to see how to go about creating a volume up and down control using the held down 1P coin button (pin 33) + up on joystick (pin 3) and 1P coin button (pin 33) + down on joystick (pin 5).

    Also is there a list of all keyboard functions on piplay/advmame? I do recall seeing one a while back but a search hasnt turned up anything.

    Thanks for all the help. :)
  • Yeah cool worked that bit out and when navigating to the Pi's IP address -> Database Admin -> GPioneer it looked like it had assigned the "enter" key to player 1 button 1 like i wanted, but still didnt work. Will have another look tonight. On that note it would likely be a good option for me to reconfigure again. Is there a command for me to do that? I assume there is an easier option than unistalling GPioneer then reinstalling and running through the config again?

    Thanks for the Volume commands, I'd never have worked that out. :) Think I'll have to hit you up for a 3 button combo script to shut down the Pi in the future as working that out will be beyond me.

    Thanks again.
  • Perfect, thanks man. Gives me plenty to work on! Will let you know how I get on. Cheers.
  • Yes, you can. It will register each as a separate device. The only thing that it doesn't play well with is other programs that use the gpio (retrogame) because it cant see what pins that they are trying to control
  • piplay controls audio via 2 methods. The in-menu music (only some themes have music) is controlled using pygame's built-in volume control, which does not directly affect anything outside of the piplay music. The volume adjust is controlling audio via Alsa command lines. I'm not familiar with adafruits usb audio, but knowing them, I wouldn't be surprised if there was a command line to adjust the audio. GPioneer supports nearly any type of command line command (including running an external script).
  • That's what I'm here for!
  • I tried out GPioneer but I am having trouble with it. The configuration is easy but something is causing my Pi to freeze. I am running 0.8 beta 9. It seems to be very repeatable on my setup. I had ESC mapped as a combo of my coin button and button 1(KP1 and ENTER). Whenever I use that combo to exit from an emulator menu(back to the main screen) my pi freezes.

    I just wanted to let you know. If you have any ideas I will set it up again and try it out.
  • one last thing, can you tell me which pins are being activated with the combo? (You can check the GPioneer table in the web-frontend if you don't know off-hand)
  • It was on a fresh install before I put retrogame on there. The pins are 11 and 12. I will install it again later today and try to assign it to a single key and I will let you know. It will probably be in another 5 or 6 hours.
  • I got a chance to try switching ESC to a single button and I couldn't get it to freeze. I also set some other buttons up as combos(tab and p) and it caused the same problem.

    If there is anything else you want me to try let me know.
  • I am trying to add a capacitive touch sensor (based on AT42QT1010 - from sparkfun.com) to the GPIO to make a keyboard input, and am having no luck getting it right for retrogame to interface. Would it be possible with GPioneer? thanks for any input!
  • That is exactly what the sensor does, which, of course is opposite from all other inputs. Would that flag set all pins to pulldown? I have one other GPIO wired button (simple open/closed) that retrogame ties to ESC. I just cant get retrogame to play with the active high sensor properly. Or, could I use the flag and put the ESC switch on pin 3 or 5 since the pullup is needed there?
  • technically, yes. You could use the gpioneer flag and then connect your standard button between one of the i2c pins (3 or 5) and a ground pin, just be careful not to mix them with the normal pins as you can cause a short. An alternative as well would be to wire your standard momentary button as follows 3.3v pin->10kohm resistor ->button->gpio pin.

    As mentioned above, you can also achieve the same results with retrogame by editing line 330ish. That is part of a loop that will set all of the pins to either high or low, you could also copy that chunk of code and paste it outside of the loop and then specify a specific pin to be either high or low.
  • as far as I can tell, that should work, but it has been some time since I messed around with retrogame. As you stated, you are using GPIO 13, maybe just double check that you are indeed connected to pin 33?
  • YOU ARE MY HERO! I wired the other button through 3.3v with the resistor as you suggested, and used the pulldown flag. After using the slick web interface and a reboot, both buttons work perfectly, and no interference with RetroPie that I can tell.

    My tribe will sing your praises over the campfire for eternity, sir! Thanks again!
  • Cool. Glad you got it working man!
  • A couple of general questions. First, I have discovered that the keystroke mapping for one of the pins is a "P" . Turns out that the P key initiates a pause in games. Further, pause does not seem to be a 'mappable' action in MAME4ALL input configuration (neither general nor game specific). I can go into the GPioneer DB and change it to a different character. Are there any issues with doing that? Any other considerations? Similarly, I had wired up a couple of extra pins for future use. Of course, I could not configure them during the initial GPioneer setup. If/when I hook something up to these wires, I would prefer to add rows to the DB, as opposed to running through the entire configuration again. Can I map the pins to any unused character or are there specific ones (like "P"), I should avoid?
    Thanks
  • Thanks. One day you'll have to explain the pattern/logic behind the bcm numbering.
  • it's just the number portion of the pins labeled gpio#. I guess that it's based on the Broadcom Soc Channels, but that's about the extent on my knowledge about that. :D
  • Great work with a good idea.You discussed the main problems encountered while interfacing the GPIO based controls.The flexibility of it sounds great in lieu of all the basic functions on others work.

    http://www.7pcb.com
  • @JohnDumais, Thanks! I've been casually using it for a while now and haven't really had any problems, so I hope that it's the same for everyone else!
  • hmm. I'm not sure. I've never needed to do something like that, but I imagine that there is something out there like that.
  • post edited out because I am stupid.
  • lol. Yes I am, and I'm trying to make amends for my stupidity (on that thread as well)

    For those interested:
    I have now used Adafruit's Retrogame, MK_arcade_joystick, and GPioneer.
    GPioneer is by far the best option, for many reasons.
  • Hello!
    I just Wanted to say THANK YOU !!
    Great work so easy to get my arcade controls working 100% .
    I used Emulatorstation with retropie before and used a guide but 2 ways on 1 controller stick didnt work :(.
    And must say i think piplay looked better with theme.
  • YAY! I'm glad that you got it working! Thanks for the heads up on the problems that you ran into. It will definitely make it easier to troubleshoot in the future.
  • hmm... I really have no idea why that would happen. I did notice that evdev (the core library that gpioneer uses) just recently got an update, I wonder if that has anything to do with it. I'll try to test it out when I get a chance, but I'm in the middle of a really big backyard project right now, so I'm not sure when that will be.

Howdy, Stranger!

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