Quote:
Originally Posted by nlt5
I wrote additional code and set the motors to -1 using a different button. When I ran the code the motor would pulse at different rotational rates.
|
This sounds like the common coding error where one button is commanding the motor to go while the other is commanding it to stop.
You need to change your if/then/else logic so that only one command is issued to the motor(s).
if your code looks something like this:
Code:
if (button1) {setmotor(1)} else setmotor(0);
if (button2) {setmotor(-1)} else setmotor(0);
... then change it to this:
Code:
if (button1) {setmotor(1)}
else
if (button2) {setmotor(-1)}
else setmotor(0);