The phidget control panel in the System Prefs seems to work fine. When I open the 1065 MotorControl from the control panel, the onboard encoder seems to work fine. It appears to read the values from the encoder as it should.
However, when I try the Java example for the MotorControl, the encoder value in the GUI always reads 0 and flickers to -1 when I rotate the encoder. The encoder value is never shown, only the 0 and -1 from what I can tell.
I've looked at the sample code provided by Phidgets and it looks like there are
and the "update" one is commented out. I thought maybe it needed to used instead of the "change" one. After switching the code to use the update listener instead of the change listener, the results are the same. The encoder value is not shown.
I've tried making my own small Java program and I'm not able to get the encoder value in their either. I've looked at the Javadoc and it seems I'm doing everything right.
Has anyone had any luck reading the encoder value in Java? Again, the encoder is connected correctly, the values read fine in the control panel application.