Component: Encoder Rotary (Inputs: General)
Author | Matrix TSL |
Version | 1.3 (Release) |
Category | Inputs: General |
Contents
Encoder Rotary component
Encoder component implements a rotary encoder connected to two pins
Examples
Example program showing how to use a quadrature encoder component. Quad_Encoder_Test
Downloadable macro reference
CheckForChanges
Polling function to check changes
Returns 1 for chaged, 0 for no change, 255 for error
Parameters
- This macro has no parameters
Return value
Disable
Disables the use of the quad encoder
Once this ist called, the read functions will return zeros until the next Enable() call
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Enable
Enables the use of the quad encoder
If this is not called, the read functions will return zeros
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ReadCounter
Reads the current dial counter
This is a counter from -32768 to 32767
Parameters
- This macro has no parameters
Return value
WriteCounter
Sets the value of the internal count variable.
Range: -32768 to 32767
Parameters
- INT Value
- Range: -32768 to 32767
Return value
- This call does not return a value
ResetCounter
Resets the current dial counter to zero
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
A
This property is of type Single digital pin and can be referenced with the variable name pin_a.
Input pin A
B
This property is of type Single digital pin and can be referenced with the variable name pin_b.
Input Pin B
Repeat Rate
This property is of type Fixed list of ints and can be referenced with the variable name reprate.
Simulated repeat rate when clicking and rotating the encoder