Purchase orders are available for educators - find out how × [hide]

empowering creative people

Videos / Makey Makey Game Controller Project for RetroPie

Source: core-electronics.com.au

For this project, we’ll be using the Makey Makey in a capacitive touch configuration. If you’re not sure how to do this, check out our Makey Makey Capacitive Touch tutorial and set it up, then continue on.

Search Videos

Related Content



Hey guys, how’re you going? I’m Sam from Core Electronics and today we’re going to be looking at one of my favourite ever Makey Makey Projects. Today we’re going to be making a game controller for a RetroPie setup using fruit and vegetables, it’s really really cool!

So what you’re going to need today is a Makey Makey board with jumper wires and a USB cable and a RetroPie setup.  Now we’ve got our Raspberry Pi running the RetroPie operating system in our Pimoroni Arcade cabinet, it’s awesome, it’s a fantastic bit of gear.  If you’re not sure what RetroPie is or how to set it up go and check out some of our other RetroPie tutorials. You don’t need this cabinet to follow, all you need is a Raspberry Pi connected to a display running RetroPie operating system.

Now take your Makey Makey board and you’ll notice that I’ve got these extra two wires connected here and that’s because I don’t have all of the inputs that I want with just one, two, three, four, five, six buttons. So I bought these out to have extra a and b buttons.

What you’re going to need to do with your Makey Makey board first of all is reprogram it to work with capacitive touch - well, that’s not strictly true, you don’t need to but with XXXXX resistive touch as you’ll know, you have to form a circuit with your body to the ground wire which means you have to hold the cable and be pressing the buttons and that is a little bit less intuitive than just touching something and having it work.

We can re-program it using the Arduino IDE to work with what is called capacitive touch. Now if you don’t know what that is then check out our other Makey Makey tutorials - they cover how to re-program your board using the Arduino IDE to work with capacitive touch. Its extremely easy - not hard at all. Or you can use the standard resistive touch if you like.

All we need to do is configure the Makey Makey board to work as a game controller on the RetroPie. Because it’s a keyboard device then by default all we need to do is map it the same as we would any other controller. First of all we’re going to plug our fruit and vegetables in and get that set up and then we can just get into mapping.

I have with me a bag of carrots and apples - fantastic! Now these 2 apples are going to be my ‘a’ and ‘b’ buttons. These carrots are going to be my directional buttons.  Let’s have a carrot there, thats going to be my left one, thats going to be up, make this one right arrow and the down arrow - cool!! So that’s looking a bit like a game panel - I just want directional controls, a, b and start.  This rather cut off one will be my start button and the 2 apples are ‘a’ and ‘b’. That’s looking good! Now take your alligator clips, you can use whatever pads you want, you don’t have to use the directional button pads for the directional buttons. It makes it a bit easier but you can actually reprogram  the Makey Makey so the pads trigger whatever key send you like, however anything is going to work because we’re going to be mapping it in RetroPie. I’m going to take alligator clip connector to the up pad, making sure it’s got a nice firm connection. Now I’ve pulled quite a lot of that rubber cover off the alligator clip so it makes a nice connection with this carrot. Now the pro tip is - open the alligator clip jaws up first and then push it in and that way when you let go it’s going to clamp down on the fruit.  Now go ahead and connect the rest of your fruit up. So I’ve got left button here, there we go. Connect this to this here carrot, now right arrow - you can use anything you want really - it doesn’t just have to be these fruits, it could be anything that is mildly capacitive or resistive at all.  Carrots, apples, oranges, potatoes, lemons - anything you could think of. You don’t even have to use fruit, you could draw it using a pencil to make your game controller. You could use people as your game controller - anything you like! The limit is your imagination.  Now I want to connect this black arrow to start and connect that to my space pad, and of course make sure none of your fruit is touching because if it’s touching and you touch one of the pieces of fruit then it’s going to conduct to the other piece of fruit as well and is going to give you  the triggers that you didn’t want to be pressed. The reason I’m connecting it all up before configuring it as a controller is if I configure it as a controller first and then go around touching all of the inputs and pads and stuff it’s going to keep triggering on the screen which is going to be a little frustrating so I’m just doing this now.

Alright! there we have it - a game controller!!  I’ve got 2 apples for ‘a’ and ‘b’ my directional arrows and a start button - fantastic!  Now take your USB cable and connect it to your Makey Makey and I’m going to have to bring my Makey Makey over here because it’s not going to reach to my Raspberry Pi board. Here we go - fantastic so I’ve got everything connected up - make sure my wires are nice and neat, got my start button got my a and b button. Now plug it into your Raspberry Pi - any of the USB ports is going to be fine. Thats going to both power the Makey Makey and communicate with the Raspberry Pi. Now take a controller that you’ve already mapped and you’ll need this to get into the start menu (so for more information on that check out our other RetroPie tutorials!)  press start, go down to configure input and you’re going to want to press and hold one of these and you’ll see it register as a device - fantastic! Now we’re going to press up to map to the up button, down to map to the down button, left  and right. Now we’ve got start and we don’t have a select which is ok, you could add another piece of fruit as a select but it’s not really used in games all that often so thats ok. I’m going to hold a piece of fruit to skip that one. Now a - touch a, b - touch b, how cool is that! touching fruit to make a game controller. Now to skip through the rest of them just keep press and hold each time to skip the next controller - it’s designed of ra whole wide range of control inputs which is why there is right thumb stick and left thumb stick and left analog up etc. So skip through……. you should be getting to the bottom now - very good. Perhaps get a permanent marker and write on your fruit to save confusion but I know this is a, b, directional pad and start.  So press ‘a’ and we’re all good to go!  You can press ‘b’ to get out of that and now we can navigate through to get to our games which is really really cool!

Today we’re going to be playing some Super Mario Brothers which is fantastic so lets fire up Nintendo Entertainment System and ooop, I died!!!!  Oh well - it’s very hard to play with fruit - it’s a lot different to a controller experience but that’s how you can turn your Makey Makey into a game pad. It’s super easy and there’s no code required unless you would like to use capacitive touch and we’ve provided all the code for you in the capacitive touch tutorial and you’ve seen how easy it is, how quick it is. It’s awesome fun to make this and I encourage you guys to post in the comments below if you’ve made a really really cool game pad using things from around house or things from the world around you, we’d love to see it.

I’m Sam and take care and check out some of our other tutorials guys - seeya :-)