View Single Post
  #1   Spotlight this post!  
Unread 10-11-2016, 15:25
Ubspy Ubspy is offline
Registered User
FRC #2335
 
Join Date: Nov 2016
Location: Kansas City
Posts: 3
Ubspy is an unknown quantity at this point
Reading encoder values?

I'm having trouble reading values from the coders. When it goes forward I get increasing values for the .get() function (for the encoder). But when I reverse the motor everything the values stay the same, and when I go forward again they continue rising, and they all stay at 0 (I'm printing the get(), getRaw(), getDistance(), and getRate() values).

I don't know if it's wiring or coding, but my code only calls reset on the initialization of the subsystem (we're using java command based programming), so I don't know why it would be resetting.

For the wiring, I only have power going from one digital input, but I'm using 2 DIO ports for the signals.

Any ideas on how to reduce the get() when going in reverse?
Reply With Quote