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
ConstructorsConstructorDescriptionRotaryEncoderHelper(MultiPinConfiguration multiPin) The RotaryEncoderHelper constructor. -
Method Summary
Modifier and TypeMethodDescriptionintGets the value of the rotary encoder.voidInitializes the listener that keeps track of the rotary encoder's position.
-
Constructor Details
-
RotaryEncoderHelper
The RotaryEncoderHelper constructor.- Parameters:
multiPin- AMultiPinConfigurationObject.
-
-
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.
-