rotaryEncoder
Connection to quadrature encoder on Arduino or ESP32 hardware
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
Description
A rotaryEncoder
object represents a connection to a quadrature
encoder on Arduino® or ESP32 hardware. Attach a quadrature encoder to the appropriate pins on the
Arduino or ESP32 hardware. Create a rotaryEncoder
object using the
rotaryEncoder
function. You can read from the quadrature encoder in
MATLAB® using object functions.
Creation
Description
Input Arguments
Properties
Object Functions
Use object functions to read from your quadrature encoder.
resetCount | Set count value to zero or user-specified value |
readCount | Read current count value from encoder with X4 decoding |
readSpeed | Read current rotational speed |
Examples
Version History
Introduced in R2017a