Using an Arduino with an arcade joystick to control LEDs

Over the long July 4th weekend (always a great time for me, being based in Europe, to catch up on projects free from interruption) I dusted off my Arduino and started playing around with it again. My goal was to hook up my Zippyy arcade joystick to find out how it might be used to control electronics circuits, in this post to control LEDs but later to drive some 1mW lasers I salvaged from some broken toy key-rings.

The joystick was actually simpler than I expected to hook up, in that it's essentially a collection of 4 switches: one for each of the primary directions (up, down, left, right). You can adjust the joystick's control plate to limit its movement to 2, 4 or 8 directions, depending on your need. I left it at the default of 8, which basically means that the diagonal corners result in 2 of the switches at a time being in the "on" position.

I used 560 ohm resistors to limit the voltage to each of the LEDs in the circuit – just as I'd done in previous projects to blink LEDs – while for the lasers I'll apparently need to drop the resistance to 50 ohms to get the 5V input voltage down to the expected 3.5-4.5V.

But that's for a future post: here's the joystick controlling a set of 4 LEDs positioned to reflect the various directions it's moved in.

Once again it's nothing particularly earth-shattering, but I do find I'm getting more comfortable implementing controls in my circuits and it'll certainly be fun to fire off low-powered lasers based on the movements of a joystick (as it stands my kids enjoy playing around with it even when controlling mere LEDs).

2 responses to “Using an Arduino with an arcade joystick to control LEDs”

  1. hey I've got a zippy joystick and I'm trying to hook mine up to an arduino but I'm having trouble would you mind emailing me your wiring schematics and code for me to take a look at?

  2. I was worried someone might ask that. I don't even have a napkin sketch of the schematics - it was all just thrown together. And the code is very basic: the pins providing power need to be switched on and that's it.

    Kean

Leave a Reply

Your email address will not be published. Required fields are marked *