|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#8
|
|||
|
|||
|
Re: Analog potentiometer to counter
I finally got the AnalogTriggers working well counting rotations.
I was using these pots: http://www.mouser.com/ProductDetail/...1hvDsngmWGdg== The key was reducing the sample rate to 1000 Hz. Code:
this->GetModule()->SetSampleRate(1000); At the max rpm of the sensor (500 rpm) that is still 120 samples per rev. I tested two implementations. Both worked fine. One used the rising/falling pulse feature to catch the rollover. The other used two AnalogTriggers to convert the pot to a quadrature signal. That was fed into an Encoder object. Code is here: https://github.com/FRC-Team-4143/TMW...hannelVolt.cpp |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|