Treehopper Java API
io.treehopper.libraries.input.RotaryEncoder Class Reference

Quadrature rotary encoder. More...

Classes

class  PositionChangedEventArgs
 Rotary encoder position changed EventArgs. More...
 
interface  PositionChangedEventHandler
 Rotary encoder position changed event handler. More...
 

Public Member Functions

 RotaryEncoder (DigitalIn channelA, DigitalIn channelB, int stepsPerTick)
 
long getPosition ()
 
void setPosition (long position)
 
void addPositionChangedEventHandler (PositionChangedEventHandler handler)
 
void removePositionChangedEventHandler (PositionChangedEventHandler handler)
 

Detailed Description

Quadrature rotary encoder.

Constructor & Destructor Documentation

◆ RotaryEncoder()

io.treehopper.libraries.input.RotaryEncoder.RotaryEncoder ( DigitalIn  channelA,
DigitalIn  channelB,
int  stepsPerTick 
)

Member Function Documentation

◆ addPositionChangedEventHandler()

void io.treehopper.libraries.input.RotaryEncoder.addPositionChangedEventHandler ( PositionChangedEventHandler  handler)

◆ getPosition()

long io.treehopper.libraries.input.RotaryEncoder.getPosition ( )

◆ removePositionChangedEventHandler()

void io.treehopper.libraries.input.RotaryEncoder.removePositionChangedEventHandler ( PositionChangedEventHandler  handler)

◆ setPosition()

void io.treehopper.libraries.input.RotaryEncoder.setPosition ( long  position)

The documentation for this class was generated from the following file: