Skip to content

DEPRECATED

Bendeguz-Cs edited this page Feb 17, 2026 · 5 revisions

Important

These functions are no longer supported and will not be included in future updates

Functions

getMotion()

getDirection()

Encoder.getMotion()

Description

Returns true if the encoder is moving, if t's not then it will return false

Parameters

none

Example

//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()

Encoder.getDirection()

Description

Returns 1 for CW rotation, -1 for CCW rotation

Parameters

none

Example

//
Serial.println(encoder.getDirection());

Note

This function was removed in version 2.0.0

Note

This function is being reintroduced under the same name in 2.5.0 You can access the documentation here

Clone this wiki locally