Go Down

Topic: Would I use analogRead to incorporate a joystick? (Read 383 times) previous topic - next topic

trogers123

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.

cyclegadget


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

http://www.instructables.com/id/USB-NES-controller-with-an-arduino/
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

JimboZA

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.

HTH?
Arduino ethernet server here.... http://jimboza.gotdns.com:8085/ (not always alive tho)
Don't read too much into my being a Faraday Member: that just means I post a lot, not that I know much.

No PMs for help please

trogers123

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

What does HTH mean?

holmes4

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

Mark

JimboZA

Arduino ethernet server here.... http://jimboza.gotdns.com:8085/ (not always alive tho)
Don't read too much into my being a Faraday Member: that just means I post a lot, not that I know much.

No PMs for help please

trogers123

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?

Go Up