|
Re: Joystick Command not working
We are using this code to do the drive on our base robot. It has worked in the past with our actual robot and connected the same way our actual robot is wired. I have uploaded the code to the basebot and it seems to not work. All of our jaguars have a solid light indicating a pwm signal and the joystick does not work on commanding the robot. When ever I connect the joystick the button the joystick color on the setup is different indicating the DS is reading the joystick. Does anyone know any solution?
[public class TankDrive extends Thread {
public void run(){
while(true){
Joystick USB1 = new Joystick(1);
RobotDrive drive = new RobotDrive(2,3,1,4);
drive.tankDrive(USB1.getRawAxis(2), USB1.getRawAxis(4));
}
}}
]
|