Would I use analogRead to incorporate a joystick?

I know it sounds like a stupid question but I'm new.

I'm trying to use a N64 controllers joystick to trigger a dc motor.

I'm not exactly sure where to begin and if someone could give me a little example or point me in the right direction I would really appreciate it.

Take a look at this link and if you need more help let us know.


I can’t speak for that model specifically, but joysticks like this one are just two potentiometers at right angles. So each axis can indeed be read through an analog pin with code like this.


That is what figured because there are 2 sets of wires coming from it.

What does HTH mean?

AnalogRead() is good for the joystick its self. But for any buttons you will need digitalRead().


tonyrogers10195: What does HTH mean?

Hope That Helps......

OK, so I looked up the Nintendo 64 controllers->http://en.wikipedia.org/wiki/Nintendo_64_controller and according to wikipedia, they dont use a normal potentiometer. They use a light and light sensor to get the position of the switch.

I took apart an old controller, took out the joystick and the "potentiometer" controlling it, and wired to a dc motor. When its all the way down, no power. And as you twist it hits a hot spot in the middle then goes to about half power when all the way up (If that makes sense).

Also i checked out using the NES controller, is the any tutorial for a 64 controller?