Pages: [1]   Go Down
Author Topic: ANN: A frequency measuring subroutine  (Read 897 times)
0 Members and 1 Guest are viewing this topic.
Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looking for a subroutine to check for a fairly regular stream of "on" and "off" inputs to a pin? Want to avoid doing it with interrupts?

I've recently put something together. It isn't well tested yet, but you are welcome to it, if it is of use to you.

It will return, even if there is no pulse train. Actually, it returns the length of a full cycle, but that's inversely proportional to the frequency, isn't it?

Details at....

http://sheepdogguides.com/arduino/art3ptrain.htm

I hope it is useful to you!

(Developed in connection with the DirtCheapDumbWireless project, DCDWireless.com)
Logged

Pages: [1]   Go Up
Jump to: