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

getTicks

Returns the number of ticks, as an ENCODER_TYPE, at the time when you performed the last read(). This number will become more negative if the encoder is rotating one way, or more positive if it is rotating the other way.
Syntax
Encoder. getTicks()
Where Encoder is the name you have given to the device in Project Designer.
Parameters
None
Returns
ENCODER_TYPE
Note
If the values of the encoder are going in the wrong direction then simply tick the 'Inverted' check box in Project Designer.
If the encoder continues to run in the same direction for a period of time then the number of ticks returned by this function will eventually wrap around to 0. See subtract(ENCODER_TYPE count) for advice on how to avoid this from happening.
See Also
read

 

 

Valid XHTML 1.0 Transitional