We are having issues getting values from our am-3132 (E4T) encoder, connected to our ToughBox Mini with Dual CIM input.
We currently have it wired as follows:
Orange Wire --> DIO 5 / 5V
Brown Wire --> DIO 5 / GND
Yellow Wire (Channel B) --> DIO 5 / S
Blue Wire (Channel A) --> DIO 6* / S
*Nothing is wired to GND or 5V
Code (Java):
Encoder enc = new Encoder(5,6); //robotInit()
enc.reset() //robotInit()
enc.getDistance(); //teleopPeriodic()
So far we have tried:
- Switching the DIO ports used
- Swapping Channel A and B wires
- Reading DIO ports using get() --> We found DIO 5 oscillates between true/false when the wheels are turning, DIO 6 stays constant false
Is there something we're overlooking?