Quote:
Originally Posted by Mark McLeod
They can be CPU hogs if used incorrectly.
The Wait call inside each one throttles the loop down and avoids sucking the life out of the CPU. So never use a While loop without a Wait.
So that example works as long as you make sure to use Waits.
There are several alternative styles that avoid the use of loops altogether, but Waits are still required to get your timing down.
Here is one alternative using a Flat Sequence Structure: http://www.team358.org/files/program...php#Autonomous
|
Well my question would be is what if your moving a motor and you want to stop it at a limit switch, how would you go about doing so without a while loop?