View Single Post
  #5   Spotlight this post!  
Unread 02-03-2012, 19:47
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Tachometer Interrupt Help

Quote:
Originally Posted by itsZN View Post
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
Reply With Quote