View Single Post
  #3   Spotlight this post!  
Unread 26-02-2012, 15:26
itsZN itsZN is offline
Code Monkey
AKA: Nick Burnett
FRC #1277 (The Robotomies)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2010
Location: Groton Mass.
Posts: 4
itsZN is an unknown quantity at this point
Re: Tachometer Interrupt Help

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
Reply With Quote