I have added some extra functionality to my Timer library to allow much more funky things to be done.
* Added external sources
Allows you to count input pulses on a timer input pin.
* Added gated timer mode
This allows you to use the timer input pin as a gate for measuring the length of pulses
* Added examples:
FrequencyCounter - counts the number of pulses coming in and calculates the frequency from it.
FrequencyTimer - Measures the length of a pulse and calculates the frequency based on an assumed 50% duty cycle
DutyCounter - Measures the length of a pulse, and also the time between pulses, and calculates both the frequency and the duty cycle of the signal.
And all of those are completely interrupt based so just run in the background while you do what you want with the results.
1 post • Page 1 of 1