View Single Post
  #4   Spotlight this post!  
Unread 30-12-2012, 18:00
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Recording times from a timer

Interrupts are a good way to approach this.

When the interrupt is triggered ( the switch hits ) you save the "actual time" to a variable. Exit the interrupt routine. Then you subtract the previous time from the actual time, which is used to calculate the wheel speed. Set the Actual Time to the Previous Time, and repeat.
__________________

I am N2IRZ - What's your callsign?