|
Re: Tachometer Interrupt Help
Quote:
Originally Posted by itsZN
Currently, we have a counter hooked up to record the number of pulses from the tachometer, which is triggered by a bolt on the axial of the wheel. Currently, the code takes the finds the average rpm of a half second, based on the number of new ticks on the counter. This doesn't work, because if we get only one tick, it reads 120 rpm, which is a big range for error.
After looking through the wpilibj api again, I found that there was counter.getPeriod(); Which would fix the whole problem most likely. If it does we won't need to use the interrupt.
Thanks Anyway 
|
have you had any luck with the getPeriod method in the counter class? i've tried it but it doesn't seem to work. it starts out with a value of infinity and never changes when i run it....
__________________
Wendy
Team 3502
|