Class RotaryEncoderHelper
java.lang.Object
com.opensourcewithslu.inputdevices.RotaryEncoderHelper
The RotaryEncoderHelper class initializes a rotary encoder component and returns the value of the encoder when called upon.
-
Constructor Summary
ConstructorDescriptionRotaryEncoderHelper
(MultiPinConfiguration multiPin) The RotaryEncoderHelper constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the value of the rotary encoder.void
Initializes the listener that keeps track of the rotary encoder's position.
-
Constructor Details
-
RotaryEncoderHelper
The RotaryEncoderHelper constructor.- Parameters:
multiPin
- AMultiPinConfiguration
Object.
-
-
Method Details
-
initialize
public void initialize()Initializes the listener that keeps track of the rotary encoder's position. Automatically called when the RotaryEncoderHelper is instantiated. -
getEncoderValue
public int getEncoderValue()Gets the value of the rotary encoder.- Returns:
- The value of the rotary encoder.
-