|
Re: activate second-function motor with joystick
Joystick j = new Joystick(1)
if(j.getRawButton(1)) //a on the xbox
{
pwm.set(1);
} else {
pwm.set(0);
}
you shouldn't use PWM, you should use what they physically are... it helps the system send the data in the correct format.
also, your robot doesn't have only one motor controller setup to your chassis there has to be atleast two or it won't turn. Ask your electrical team for the correct ports on the PWM, and dont spam 0's at the end of the constructor as that will error out
|