Reference Language | Libraries | Comparison | Changes
Represents the 2 quadrature encoders embedded in the carrier board. The two objects are encoder1 and encoder2.
encoder1.getRawCount()
encoder2.getOverflowUnderflow()
getRawCount()
: Returns the number of counts from start as an integer. getOverflowUnderflow()
: Returns true (a boolean) if an overflow or underflow has happened. getCountPerSecond()
: Returns counts per seconds (velocity) as an integer. resetCounter(int)
: Resets counter to a certain value. setIrqOnCount(int)
: Sets an interrupt when a certain count is reached. setIrqOnVelocity(int)
: Sets an interrupt when a certain velocity is reached.
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.