2-Axis Joystick
stx2006
Posts: 20
I bought the 2-Axis Joystick from Parallax to use to control my robot. Question is. How do I wire it up? I followed the KickStart guide on the website. But I can't seem to get it to ever work. I was wondering if someone could help me out.
Also is there anything different I need to do if I wire it up and it's on sitting on the breadboard?
That's the code I'm using. It's the code on the KickStart guide.
Here's some pictures on how I have it wired up and what the Debug window looks like when I try to run it.
Also is there anything different I need to do if I wire it up and it's on sitting on the breadboard?
[COLOR=#000000]' {$STAMP BS2}[/COLOR] ' {$PBASIC 2.5}UDPin CON 8LRPIn CON 9LR VAR WordUD VAR WordDO HIGH LRPin PAUSE 2 RCTIME LRPin, 1, LR HIGH UDPin PAUSE 2 RCTIME UDPin, 1, UD DEBUG HOME, "UD = ", DEC UD, ", LR = ", DEC LR, CLREOL PAUSE 50 [COLOR=#000000]LOOP [/COLOR]
That's the code I'm using. It's the code on the KickStart guide.
Here's some pictures on how I have it wired up and what the Debug window looks like when I try to run it.
Comments
I think you should move the lower lead of the top cap down one row. The top lead of the top resistor will also need to be moved one row down.
I might not be seeing how your board is wire correctly do to angle of the photo, but if I'm seeing what I think I'm seeing, I think changing the wiring should help.
Thanks for the better picture.
As Duane mentioned. the top connection should got to L/R not L/R+ according to the Learn Tutorial.
Also on the bottom connection, the black wire, (which I assume is GND/VSS) should move down one hole to GND. The resistor lead should also move down one hole to the U/D pin on the joystick.
Hope that helps.
EDIT: Just saw one more mis-wire. The top blue wire should move up one hole to connect to the resistor. ( (The connections are horizontal on a breadboard).
Check out this tutorial that Parallax put together:
http://www.learn.parallax.com/breadboarding
The picture for the BS on the Kick Start page is misleading because mine doesn't have the slot of holes on the breadboard below P0.
.
.
.
Your code didn't show up correctly in your first post.
Or use the attached file.
You might also want to check two other pins on the BS2.
Change PINS 8,9 to 10,11 and change the wiring accordingly. This will check if the pins on the the BS2 were damaged.
The code tags do not seem to be working.
Try double-checking your capacitor and resistor values.
Excellent call! I thought it was my tied old monitor.
Good catch! I didn't even notice that when I bought them. I'll go get the right ones and try that!
http://www.parallax.com/sites/default/files/downloads/122-32450-XBeeTutorial-v1.0.1.pdf
I don't have that. I don't like buying "kits"