|
Re: Encoder help
(From the same team)
W have the Phase A signal hooked up to Digital IO 1, and Phase B hooked up to Digital IO 11 as per the Kevin.org code.
When we print off the value from Get_Encoder_1_Count(); all that is returned is either 256 or 260 without any change when the encoder is rotated.
When we print off the value of digital_io_01, all that we are able to see is a -1 or a 0 (Which is odd because the ios should be showing 1 or 0, not a negative).
Also, when we reset the encoder count after each call of the count, the encoder alternates between 1 and 0. When you are turning it forward, we get a 1, and backwards a 0. However, when we allow the code to handle counting, all we see are 256 or 260.
I am reading through the code and will be trying the Quadrature code tonight.
Thank you!
|