3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

CRANE GAME

Step 30Wire the joystick

Wire the joystick
                                                      
The wiring got a bit messy. 

Basically every pushbutton is connected to a 10K pull-down resistor on one side and 5V on the other.   The arduino pin for each button will be connected between the button and the resistor.

So each button goes like this:

Button  (one side)---> Arduino input pin  --> 10K resistor  -->ground on arduino
Button  (other side)---> 5V on Arduino

Now when a button is open, the output to arduino will be low.  When the button is pushed it will be high.

I used Cat-5 network cable for this.

Here is the wiring to the buttons on the controller and to the Arduino -

Wire - Button - Arduino Analog/Digital:

Blue - Up (joystick) - A0 / D14
Blue/white - Down (joystick) - A1 / D15
Orange - Left (joystick) - A2 / D16
Orange/white - Right (joystick) - A3 / D17
Green - Left button (claw open) - A4 / D18
Green/White - Right button (claw close) -A5 / D19
Brown - Ground (Arduino) - Ground
Brown/White - 5V (Arduino) - 5V

(note: the analog pins on the Arduino can be used as digital pins)


« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
41
Followers
16
Author:marc.cryan
Looking for access to land or water in Boston Metrowest area.