WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

getStepsRemaining

Returns the number of remaining steps from the last step() command.
Syntax
StepperMotor. getStepsRemaining()
Where StepperMotor is the name you have given to the device in Project Designer.
Parameters
None
Returns
int16_t
Note
This can be used to test if a step() command has finished by checking if the returned value is zero.
If the motor was already moving in one direction and you then ask it to make 10 steps in the opposite direction then this function will start off by returning a value larger that 10. This is because it must first decelerate to a stop and hence it now needs to move more than 10 steps to go back to the position you requested.
See Also
step

 

 

Valid XHTML 1.0 Transitional