ROBOTC.net forums
http://robotc.net/forums/

Code Question
http://robotc.net/forums/viewtopic.php?f=69&t=13833
Page 1 of 1

Author:  Hoenickn [ Mon Apr 04, 2016 3:26 pm ]
Post subject:  Code Question

I am trying to code my robot to have a button that reverses motor movement. This would make driving the motor backwards feel like driving it forwards. My code is as follows:

task main()
{
while (1==1){

motor[port1] = vexRT[Ch2];
motor[port10] = vexRT[Ch3];

while (Btn8D == 1){
motor[port1] = vexRT[Ch2]*(-1);
motor[port10] = vexRT[Ch3]*(-1);
}
}
}

Compiler says that the 2nd while loop will always be false. I don't understand this. Any advice would be appreciated.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/