Introduction: Arduino Gamepad / Controller
Well, hello there.
My name is Rik Geersing.
I am a student at the HKU in Utrecht, the Netherlands. I study Game Development.
Well, it's obvious that when someone studies this profession, he/she must have some interest in games, and I do. I really love simulation games. I usually play these with either a controller or sometimes a steering wheel. I am currently looking for a flight stick too.
But, with all these controller types, I usually have to keep a keyboard near me to press the buttons I miss on the controllers. And that's where this project came. I wanted to make a controller 'extention', without having the need of a keyboard.
So I did! And I am going to show you how I did it.
Step 1: Gain Your Parts!
You cannot build a controller without any materials.
What I used:
- Arduino Yun
- A lot of wires, connectable to a breadboard
- A breadboard
- Resistors (for not exploding the LEDs!)
- Three buttons ( I got them HERE! )
- Three switches (on / off function, I got them HERE!)
- Three LED lights 10mm ( I got them HERE! )
- 50x70cm piece of wood (anything less than 0.9cm)
- Enthousiasm!
Make sure that every part has got wires soldered to them.
Step 2: Programming and Wiring!
It's time to tell your Arduino you're not messing around, you want it to do what you want!
Well, here's how we'll do that. First, you will need the code, it is linked inside this step called 'ArduinoController.ino'.
Second, you must make sure that you wire your Arduino correctly for the lights to pop up and the buttons to work.
There's six lights in this specific controller. Three of them are testing lights, to make sure that the lights work, I have also embedded them in the controller for some cool looks. There's three buttons and there's three switches. The code tells them they are your keyboard's 1,2,3,4,5 and 6 button.
I programmed it this way so it would work in any game, you just have to make sure you bind your functions to them.
When you have done the wiring as shown above and your Arduino has recieved the programming, you should see the same as the preview video! ( If by any chance Instructables does not show it, you can still watch it HERE! (opens in a new tab)
Attachments
Step 3: Lasercutting and Making It Into a Single Object!
Well, here comes the fun part.
Lasercutting! Very cool to experience, you'll be blown away how accurate these machines can cut!
I've added the Illustrator file for you, it's completely prepared to get lasercut. I also added a preview of how the Illustrator file looks, for the people who might not have Illustrator installed and still want to see what's inside. Make sure that your piece of wood (50x70cm) is completely flat and not wet or something, it's not good for the quality.'
Once you have lasercutted it, you show be able to place everything together! A warning though, because of the heat, the lasercutter can remove a little bit more than expected, so get your wood glue ready!
I reccommend you to put the lights, buttons and switches in, and only glue one side of the controller! You can wire it afterwards and then glue the other half, since it will save you loads of trouble.
I've added a video to this step, if it's not working, you can still watch it HERE! (opens in a new tab)
Attachments
Step 4: The Final Steps, Wiring!
Well, you have made the Arduino work on the breadboard, now we are going to embed this into a working controller.
Replace your placeholders with the correct buttons and place the lights inside the correct slots. DO NOT forget the resistors between the power and the LEDs, since it might blow your LEDs up.
When you have correctly placed all the wires (this is not a nice task, the controller is so small inside!!), the three lights on top will light up after each other, telling you they work. The buttons beneath them should be working inside your game, and the switches below them should work too. The three LEDs above the switches should turn on when you turn on your switch.
I've added the working Arduino video to this step, but if it's not working, you can watch it HERE! (opens in a new tab)
That's it! You've built the controller extention! Good job!
Step 5: Essential Files - Again!
For usefulness, here are all the files you need.
- The Illustrator file (.ai) to print.
- The Fritzing document (or the preview image) to make sure you know where all the wires go.
- The script to make the Arduino run. (the .ino file)