|
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?
|