-
Notifications
You must be signed in to change notification settings - Fork 1
DEPRECATED
Important
These functions are no longer supported and will not be included in future updates
getMotion()
getDirection()
limitedRead()
Returns true if the encoder is moving, if t's not then it will return false
none
//prints a 1 to the serial monitor if the encoder is moving, else it prints 0
Serial.println(encoder.getMotion());Note
This function was removed in version 2.0.0
Note
This function is available in a similar way as encoder.motion()
Returns 1 for CW rotation, -1 for CCW rotation
none
//
Serial.println(encoder.getDirection());Note
This function was removed in version 2.0.0
Note
This function is being reintroduced under the same name but DIFFERENT FUNCTION in 2.5.0
You can access the documentation here
Returns an integer that can be changed by the rotary encoder but can be given a lower and an upper limit.
-
int Minval- lower stop -
int Maxval- upper stop
//Returns the value constrained between 0 and 10
encoder.limitedRead(0, 10);Note
This function is still available for compatibility, however it is not recommended for new projects and is either not present or non-functional in all versions from 3.0.0 to 3.0.2
Note
The replacement function for this is setLimits()