Program GPIO controls on a DIY Raspberry Pi Arcade Cabinet! HOW TO DO IT EASY!
HTML-код
- Опубликовано: 11 сен 2024
- Like, subscribe, and comment below.
If you found this video helpful consider buying me lunch!
www.paypal.me/...
This video shows how to do the basic programming needed in the Recalbox operating system on a Raspberry Pi when using the GPIO headers for connecting your arcade buttons and joystick.
I edit the 'recalbox.conf' file to allow the GPIO header controller. This can be done by root access via the terminal. I do it directly by plugging a keyboard into the Pi. On the frontend screen, press F4 to quit, then ALT+F2 to get a terminal and use credentials below.
Once you have got past the password part ("root" as login and "recalboxroot" as password.) type 'nano recalbox.conf' to access the file. Scroll down and enable the gpio by changing the 0 to a 1 as show below.
*Be aware that sometimes what you type doesn't actually show up on screen*
----------- D3 - GPIO Controllers ----------- #
GPIO Controllers
enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1)
controllers.gpio.enabled=1
mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2)
controllers.gpio.args=map=1,2
Found at:
github.com/rec...)
--------
FULL CABINET BUILD VIDEO : • How to make a DIY Rasp...
There is still much to be improved with these builds. These are a starter project that still leave much to be customized. If you have cool ideas please let me know in the comments below!
All the plans can be downloaded from: holbrooktech.we...
More explanations and downloadable packages!
Instagram / we_build_stuff
Recalbox: www.recalbox.com
Raspberry Pi operating system - donate to them!
One of my favorite eBay stores: stores.ebay.com...
joystick and button sets for $60-$100
My Local suppliers
www.rpelectroni...
leeselectronic....
Original Cabinet design by www.instructabl...
Music:
I dunno by grapes (c) copyright 2008 Licensed under a Creative Commons Attribution (3.0) license. dig.ccmixter.or... Ft: J Lang, Morusque
Almost three years later, this video is still a huge help!
Great to hear! Would love it if you checked out my long video about a larger version I made. More in depth on some design and tricks I was able to try
Thanks for making this video, everybody always leaves out the gnarly config stuff. -- btw, Protip: if you type "reboot now" (or "sudo reboot now" if you're not root), it will reboot right away, and you won't have to wait. [same for shutdown, you can type "shutdown now"]. ;-)
Michael Jensen awesome. I was never able to figure that out!
measure twice, cut once... nice! you earn a suscriber!
cheers. thanks!
Thanks, this really helped me with a project :)
I absolutely love it! thank you so much it is so helpful and you are great explaining.
Thanks Deborah! That's how I roll :)
Thank you, working on a portable project and this will be helpful.
Hi. Thanks for the video. Very informative but for some reason when I typed in 'nano recalbox.conf' it just showed a blank screen. Maybe it was because I was using the raccoonbox image but after hours of trial and error I managed to do it. When you get to the blank screen, press ctrl + r and it will ask what file to read. Thats when you type in recalbox.conf. but it started me off at the bottom of the page so I scrolled up to the joystick options and voila. Worked like a charm. If anyone runs into this problem maybe it will help them. Thanks again
glad you found a fix! This video is from a few years ago and they have done some big updates to Recalbox that make things a bit easier :)
also I think it comes up with a blank screen until you type the admin password (which should be in their wiki page).
forum.recalbox.com/topic/965/resolved-edit-recalbox-conf/3
I know this video is old but I was hoping to pick your brain. I'm trying to create a DIY arcade cabinet with a similar button layout. I soldered in a GPIO board to the Raspberry Pi 0. We will be playing games from Makecode Arcade and I have added the main menu. It's showing me a button layout for the pins but I've attached a bunch and they don't seem to be working... not sure where to go next. I have a screen with a duck and a map of pins. This is my first time- not sure what to do.
Thank you very much. You are the best on the world. Thank you ...
lol thanks! Check out my latest video series on building bigger bartop arcades!
Excellent teaching skills
Me aclarado las dudas que tenia, muchas gracias.
Thank you thank you thank you. Love the arcade videos.
Thanks for the love. I'll keep them coming
Thank you. This helped!
Hi mate. I've hit a snag in my build. For some reason when I went in mame games on street fighter 2 I can't play just a one player game. I have to put two credits on, then press select on controller 2 to start the game it won't start with player one when I press select. Tried some other games same snag apart from it will start with just one player playing. I want to be able to just press start for credit then select to start on the one player side. Any advise would be a helpful. Cheers. Leon.
Hello! very good video, I have two questions: Do you have lag playing connecting arcade pads with gpio? Where do you connect hotkey button in gpio? thanks!!
I don't think I'm a fast enough player to see any lag time :)
the wiring diagram is here. Look for the "HK" labels
github.com/recalbox/recalbox-os/wiki/GPIO-controllers-(EN)
Hello !! I don’t see the button where you can save the settings and can’t reboot it ? Can you please let me know exactly where should I go to do those 2 last steps ? Thanks
github.com/recalbox/recalbox-os/wiki/Root-access-on-terminal-%28EN%29
To reboot make sure you have saved first. i did that with CTRL X and make sure you type Y or YES to save
then I think I just typed reboot
I think it is around the 4:00 mark
Do I need to add resistors for GPIO buttons for raspberry pi 3 model B or can just go ahead and wire them directly?
direct! I show how I do it here
ruclips.net/video/NUmrwvQ0reI/видео.htmlm26s
Well congrats on 1,590
Can you please help me? I have that same keyboard that I dismantled and I can't get it working whenever I try to put it back together.
Buy a new keyboard. This is just a cheapo keyboard. buttons fall off it all the time
We Build Stuff They didn't fall out. I just unscrewed it and can't remember how to put it back together.
Hello! Thanks for this video. I have a question, how can i connect the gpio to the controllers, since the connector is the same for buttons and my controller doesnt have the right input. thanx
Can you be more specific? Each of headers on the on the GPIO pins can be used for a special input/output. I plug them in using "dupont connectors" with the other end of the wire going to the microswitch tab of the arcade button or joystick microswitch. You can see here how I did mine: ruclips.net/video/NUmrwvQ0reI/видео.htmlm25s
Can someone point me towards the connecter ends for the wires that you need to connect to the pi?
I've used dupont connectors before
Buen día. He conectado los botones por gpio y existe un pequeño retraso en la señal. Tengo un mando conectado por USB y funciona perfectamente. Si tuviste este mismo problema te agradecería tu ayuda.
Thanks a lot! You save my work! hhehehe :D
Great video, Just wondering what made you pick to connect to this by GPIO? A lot of these arcade button kits already come with USB encoders, did you find them to not work as well?
Joseph Fernand the first kit i bought 2 years came with an encoder that didnt work so i did this as another option. the thing i like is there is no chance of player 1 or 2 switching because of the pi reading the usb inputs wrong. i have used good and bad encoders but the gpio input method has worked for me everytime
We Build Stuff thanks for your reply! Are you able to point me in the direction of your wiring diagram?
Joseph Fernand see the video deacription for wiring diagram links
We Build Stuff sorry! I'm just having a bit of trouble finding it? Is it supposed to be on the instructables web link?
github.com/recalbox/recalbox-os/wiki/GPIO-controllers-(EN)
holbrooktech.weebly.com/pi-arcade-101.html
hi I am.planning building a cabinet with coin acceptor, what kind of hardware I need to attach the coin device?
just a jump wire from the coin slot trigger to the correct gpio. it will be the same ones used for player 1 and 2 select/coin inputs. google "recalbox gpio" and see the diagram
We Build Stuff thanks very much
Thanks man!!
You're welcome
I know this will seem like a stupid question , but were do the games roms come from for the Recalbox ?
The internet is a series of tubes. You have to find the right tube for the roms.
There are many file hosting sites that you can find them but I don't post that here.
ok, so there not part of the OS itself. gotcha, thanks for the reply.
I got to minute 5:00 and my usb sanwa joystick only records UP. I noticed a red light on the board. All the other buttons work fine. Help!
It is going into a USB encoder or is the joystick itself usb output.
This video is showing recalbox configuration qith GPIO inputs
We Build Stuff
Thanks for replying.
This is the joystick
www.google.com/shopping/product/6252570243308334294/image?q=sanwa+joystick&client=safari&hl=en-us&biw=414&bih=719&scsr=p:10084433026864844323,17041725965749815564,7284976529823103220,1960153313431924325,10305593274331282914,11969714406085033102,10260444283388161936,12299743188865798947,705983718248761226,13654226866682590406&prds=cid:6252570243308334294,cs:1,paur:ClkAsKraX3VA7D1gi1sz5l3ASbNAfrn2sEkjgjGkuOwn8keJGBwd7q-x_Vq9ZjbyTAejKjz68ajTYJUboe05-3Bgxah0s1xLGMaGiUW7tLuMzvnItncR1kjwohIZAFPVH73bB4BF7K5kHqRj_3-LuVg1XOUt6A,sgro:iv,mvi:0
We Build Stuff
I plug it directly to the raspberry pi3 usb slots.
@@martymcfly6129 is it both joysticks that have the issue or just one. I have had bad wires or broken ground loops before that have stopped my connections from working properly and it wasn't until finding the bad wire that i solved the issue.
I use the same uab encoder for most of my builds. I only have used recalbox so I'm not sure how drivers work for other versions like retropie, etc
We Build Stuff
Both joysticks. Could it be that it is not wired correctly?
looks great! looking forward to building mine. getting an understanding of everything right now and may be a silly question but what is the difference between the hotkey and a reset button?
the hotkey is used with a combination of another button for a result like: exit to menu, save state, load state, etc. The reset button completely shuts down the pi and boots it up again
I got to the controller change but I couldn't save it.... how do I use the save command after changing it to 1 from 0?
It should say it at the bottom of the screen. Should be "CTRL X"
freeze the video at 2:40 you can see it at the bottom
Do you have any mapping about on wich pin connect each button and joystick? i cand get an usb encoder so i want to try this aproach.
Thanks!
github.com/recalbox/recalbox-os/wiki/GPIO-controllers-%28EN%29
and
forum.recalbox.com/topic/11125/custom-gpio-pins-map-for-controllers-mk_arcade_joystick_rpi
That being said... Since this video I have switched almost exclusively to using a USB encoder. It is so much easier!
Thank you for this :)
you're welcome!
Hey which plans should I use to build it there are several of them and which is the latest one? Is there one pdf I can go by?
plans:
holbrooktech.weebly.com/uploads/5/3/6/0/53607781/arcade_plans_package_8.5x11_print_updated_november_2016.pdf
and the write up:
holbrooktech.weebly.com/uploads/5/3/6/0/53607781/arcade_write_up_holbrook_updated.pdf
how to wire the gpio pins? thanks!
How much faster is to connect the controllers directly into the raspeberry than using a Controller for the joystic and button ?
Gustavo Navarro way quicker if you have a usb keyboard encoder. i had compatiblity issues with the knock off xin-mo i originally bought. it only took me about an hour to cut, strip, crimp, and connect everything. my cable management looks better now than in this video 😊
Thanks for your quick response. I have noticed that SFII doesnt response 100% using usb keyboard encoder. Will try as u have it.
I owe u a beer :)
Is there a way to set up a trackball for golden tee on the gpio pins?
Nick jones only certain emulators support a trackball. www.google.ca/amp/s/joshcaplin.wordpress.com/2016/03/23/homemade-arcade-cabinet-with-a-raspberry-pi/amp/
I use twin USB gamepad, but i cant use game pad for 2 player... I can only 1 player...
Abanx FZN some gamepads are not recognized by recalbox as 2 player. Check the list here for supported usb encoders
github.com/recalbox/recalbox-os/wiki/Compatibility-%28EN%29
ok thanks
Very great video, explains a lot and fabulous content. I was wondering if you could answer a couple of questions...What do you use the hotkey for? Do you map an exit button?
The hotkey plus another button will serve a function in recalbox like exiting back to menu, save states, rewind, etc.
@@WeBuildStuff How do you program the Hot key to buttons in order for them to do the actions you want. I always see videos and they get to the hotkey and assign a button, but never get into how to select other buttons for the different types of actions. Do you hold the hotkey down and move the curser to the actions you want the buttons to perform? Any help would be so much appreciated. Love your builds you do phenomenal work.
@@doityourselfjim7368 thanks!
Recalbox has them programmed in already. Scroll down on this link to "special commands"
github.com/recalbox/recalbox-os/wiki/Manual-%28EN%29#duringgame-special
Awesome vid! I've been buying arcade controller boards to interface to the Pi and never thought you can connect the controllers directly. Is there anywhere that shows the pinout for the gpio to the buttons / stick?
much obliged!
Hello Great video one question with is the GPIO pin with connect the ground of the buttons?
each button has a microswitch with 2 or 3 terminals on it. I connect to ground and the "positive" with 2 wires and connect them to either the GPIO headers on the pi or to the correct headers on a USB encoder
Hey Mike. Any ideas on adding a roller ball in addition to the 2 player joystick configuration? Are there additional GPIO inputs to tap into? Or a "switch" box to switch between player one joy stick and ball?
i dont know much about those but usually that would be an analog signal so probably usb. it would be interpreted as a mouse input i believe. im sure there is a reddit thread or forums with info. that would be an awesome addition. a spinner too!
Very good. Thanks
great series. buying all the parts now..so probably 2 months till they all get here lol. thanks for sharing this. I've been debating over gpio vs zero delay USB. the USB would let me upgrade to PC later on for newer stuff, but gpio should be fine if I don't mess with it too much. any thoughts? also have you tried this with any other pre-built emu based front/back end ?
Recalbox has been the only one I have used so far but I would like to try some other ones with nicer looking front ends or do a hyperspin build.
The nice thing about the GPIO installation is you can easily unplug from the GPIO and plug into a USB encoder and have it up and running with just some menu tweaks and changing the recalbox.conf file to the right controller setting :)
We Build Stuff took less time than I thought. it's not perfect, but my kids love it...& just maybe I enjoy playing sf2 & dark stalkers:). thanks again for the videos. FYI I went with the USB encoders mostly because it didn't look as easy to set up gpio for retropie & they were 6$ from China.
awesome! which encoder did you use? and did you stay with Recalbox or retropie?
We Build Stuff I used the zero delay encoders & retropie. still an easy setup & when I have time want to try kids mode (only selected games are playable)
can you show how to use gpio pins with retropie? i don't like recalbox because it don't support daphne.
Search for "retropie gpio digital lumberjack"
He made a driver you can download after installing your retropie image. I don't remember the specifics of it but I did it once last year
github.com/recalbox/mk_arcade_joystick_rpi
www.raspberrypi.org/forums/viewtopic.php?t=82878
Nice dude! Where did you get the GPIO connectors and cables?
I made my own using "dupont connectors" and wire
Hey man, Awesome video! I have the exact same setup and it works perfectly aside from when i load a game, i can't get function from the start and select buttons. joystick and other buttons work and hotkey functions. In the Recalbox menus start and select to pull up the the appropriate menus. Any idea what might fix that? thanks for you time in advance!
Are you doing it via GPIO. could be your wires are not plugged into the correct header...
maybe try resinstalling the OS
The start and select function properly for the recalbox menus. But during emulation have no function. Thanks for the tips. I’m going to try reinstalling the os and try again.
Nick Laub weird. Have you checked for any wire grounding issues? I had it only happening sometimes with my start and select buttons. It turnes out there was a break in a cable near where my connectors touched the microswitch on my latest build
working now, it was the wearedirtygaming.img file. While it has a good selection of games, the edits made the GPIO not work properly. Now I need to find a source for the roms, any advice there is also apperciated, working on christmas presents Thanks for your help!
Is there a way you could do a video on a total walk through on the setup of the GPO pins for the controller setup? It would be very helpful for first time builders and make it more understanding. I have a 2 player setup i can not get to work right. Thanks for reading my comment to.
Are you talking about plugging the pins into the board or setting it up in the menu like at 4:36?
I am making another full build video but it won't be done for awhile as I am taking my time and helping some students build their own as well.
You can see the way I have installed the wires in my other video for now at 12m25s . I will try and do a future video of just the wiring.
ruclips.net/video/NUmrwvQ0reI/видео.htmlm25s
I found my information on how to do it on the Recalbox website
github.com/recalbox/recalbox-os/wiki/GPIO-controllers-(EN)
Hi, great video, thanks, please, whats commands to save the config ?
at the bottom of the screen should be a list of commands. If I remember you press "ctrl + X" then it will ask you to save "press Y" then "enter/return" and then reboot your Pi with the "reboot" command
3:52
in your last raspberry pi video I saw the Canadian flag. You located in Canada?
Daniel Audette Vancouver in beautiful British Columbia!
How do you handle the need for an escape key?
are you referring to "exiting a game and back to the selection menu" or the escape key on a keyboard?
I found it, I was suppose to use the Hot Key + start I believe. Sort of hidden in Github. Thanks so much for making this video.
Sorry, I was referring to the same function as using the escape button on a keyboard to get out of a game. After a while searching I found this Hotkey mapping on Github (github.com/recalbox/recalbox-os/wiki/Manual-%28EN%29#b---special-commands). So now I know you have to hold that Star Key (Hotkey) and push Start. (Hotkey + Start → End Game and Quit To Main Menu). Thank you by the way for making this video. It has really helped.
Yes. I press hotkey + start/1player button
OMG FIRST COMMENT!!!!!111!111ONEONE
Dude, the reflection is a killer...put your beard in the way or something...
Maybe next time. I don't use that plexiglass anymore!
Hello friend.
Good video of gpio connection.
I'd like to talk about this video.
Do you send me your mail account?
Thanks you.
I like to answer questions directly on this page so that others can benefit as well
why does your video shake like a parkinson?
Igor Nardo I held a phone with one hand and programmed with the other. Congratulations on being so perceptive lol
ok cool, just asking cos video is cool and helpful actually, but the shaking makes it hard to watch, btw very good final result with the cabinet!
It's actually cool that you built it upon rekalbox (which i like more than classic retropie) but i'm actually going for retropie simply because there are simpler libraries to map stuff.
It would be cool to see the buttons wiring process... Cheers! (and thanks for getting back to me ;)
Igor Nardo for sure! Check out the full build video on my channel to see the wires. I would do it differently next time and just use a USB encoder!