|
Re: Beginning programmer: Variable question HELP!!!
It takes about 400 to 600 nanoseconds (maybe a bit more) for the three IF statements to execute. You cannot hit the trigger fast enough to satisfy only one IF statement.
The first time through, bob goes from 2 to 0.
The next time though, bob goes from 0 to 1 to 0.
The code is doing exactly what you told it to do...
Regards,
Mike
__________________
Mike Betts
Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013
As easy as 355/113...
|