Monday, January 9, 2012

2-Axis Joystick sample from parallax!

It arrived to day, so i though i'd attempt to control my little TV IR remote controlled robot with it. Compared to the old DB15 joystick i was using before its precision way better and easier to code for!

I have one Arduino on the robot, and one connected to the joystick. I didn't have to change the robot code; just needed to program the Joystick Arduino to send the same IR codes as the remote but, this time using a joystick as input. I still prefer using the remote for two reasons: the Arduino IR LED has horrible range, and i still cant get each servo to have better speed control than stop, forward and reverse(so a joystick is kinda pointless :)). I have a little board with three IR LEDs from one of those cheap IR helicopters, so im gonna hook that up to a NPN or PNP(allows more current than the Arduino can deliver) and see if i can get better range.

Lastly, i though he way parallax laid out the pins on the joystick as slightly annoying. It has a GND(linked to other the other GND and pot), two separate output pins (one for each pot) and 5v for one pot on each side of the board. But the 5v was labeled and traced as two different lines, so i had to have two 5v wires(one for each pot). They could have just had one 5v on each side(like they do now), but link them together(or just one 5v pin...)! But, hey, I got it for free, why complain, right?!

No comments:

Post a Comment