harp-tech / device.behavior

A multi-purpose device tailored to behavioral experiments. It allows control of pokes, RGB LEDs, LEDs, cameras, servo motors and a quadrature counter.
1 stars 0 forks source link

Create displacement reading option for quadrature encoder. #12

Closed filcarv closed 11 months ago

filcarv commented 11 months ago

This PR implements a new mode for the encoder. Instead of reporting the absolute radial position, it now reports displacement correcting around the 0->2pi transition.

This mode can be enabled by setting the register 83 to 0 (position mode) or 1 (displacement mode)