Log in

View Full Version : Victors controlled with joystick Buttons


JamesBrown
18-02-2005, 17:13
For the motor that drives are arm I am trying to use PWM9 with the hat on the port 1 joystick. Using the default code when I turn on the robot the motor spins, When i push the hat forward it spins faster and when i push it backwards it spins alower, Any idea what the problem may be?

James

Matt_Kitts
18-02-2005, 21:28
check your calibration

Alan Anderson
18-02-2005, 23:39
The "problem" is that the hat is not a joystick. Use the Dashboard program to see what analog values it provides on the wheel input. I don't have the actual values handy at the moment, but ours is something like 95 for down, 255 for up, and 43 for center. Left and right have specific values too. You can also detect simultaneous left/down and right/down if you want to, but the up resistor is of low enough value that it overpowers the left and right and always gives 255.

(I don't think the default code does anything with that value, though. I suspect your joystick just needs to be recentered with the little trim control to the right on the base, and you're actually moving the joystick itself when you try to use the hat.)