You will need a Piper Computer Kit and a Piper Command Center for this Project
To complete this project you will need a Piper Computer Kit and a Piper Command Center. If you purchased a Command Center + Light Show bundle, those mini buttons and jumper wires will be included there as well.
Additionally, you will need to have either:
- The Arduino IDE installed on your computer
- Have the Arduino.create plug-in on your computer
IF YOU DON"T HAVE EITHER, START HERE!
Did you ever think how a video game controller works or what's inside of it? Most people have not. As we aspire to have our users become the creators and inventors of tomorrow, we wanted to show you can build and program your very own video game controller to play games like Minecraft, Roblox and many more.
In this project you will learn how to wire mini buttons on the Command Center Breadboard and Arduino Micro, upload new code to the Micro and then customize the code to make the ultimate video game controller.
The simplest way to envision how this works is to think about how a keyboard is used to play a video game. You press the "w" button and the character moves forward and maybe the "spacebar" makes you jump. You will be programming the Command Center to replicate those keystrokes. The magic is that you can program any keystroke to any button press or joystick movement on the Command Center.
Ready to get started?
STEP 1: Collect your Materials
- - Piper Command Center
- - Breadboard attachment for Command Center
- - Screwdriver
- - x3 Mini buttons
- - x4 Jumper wires (Blue, Black, Green, Yellow)
STEP 2: REMOVE COMMAND CENTER LID (part 7 or 8)
On the Arduino, there is a black plastic cover next to the reset button that covers up 6 pins. Go ahead and remove that plastic cover.
STEP 3: Switch Standoffs
- Switch 11/32” standoffs (x2) for the Lid with ⅝” standoffs (x2) used to attach the Breadboard Puck.
- Then, screw the Breadboard puck onto the 11/32” standoffs.
STEP 4: Mini Buttons and Jumper Wires
- Attach Mini Buttons (x3) on to the Breadboard as shown below.
- Wire the Blue, Black Green, and Yellow wires as shown below.
STEP 5: Connect the USB
- At this step, you will need to either use Arduino.create or Arduino IDE (on your desktop) to proceed. Further instructions are available here.
- If using Arduino IDE, open Arduino’s IDE and launch a new sketch. If using Arduino.create, go to next step.
STEP 6: Code
- If using Arduino.create click the OPEN CODE link below or copy and paste into your Arduino IDE Sketch.
- If using Arduino IDE on your desktop copy and paste the code below into your Arduino IDE Sketch
- Having issues? Check your port and board connection under the tools menu.
STEP 7: Ready Your Control
Check your key mapping. If your controller’s joystick or buttons are not working properly,
check your code or wiring.
KEY MAPPING: RASPBERRY PI EDITION OF MINECRAFT
KEY MAPPING: PIPER COMMAND CENTER MINECRAFT CONTROLLER
STEP 8: WHAT DOES EACH BUTTON DO?
- - Press the joystick down to make your player jump.
- - The Mod Button changes how some of the buttons work
- - Hold down the Mod button, press down the joystick, and your player will crouch instead.
- - Additional uses for the Mod button are to access inventory, select a block in the bottom bar or exit to the menu
STEP 9: Check Your Work
-When everything is working correctly, screw a Lid back onto the Piper Command Center and PLAY!
- - Do not like how a button functions? Want to hack or customize? Modify the buttons’ function in the code. Have fun and explore!