Page 1 of 1

How to calculate beats per minute from digital port input

Posted: Wed Aug 10, 2011 3:09 am
by gggwww
Hello,

How best to calculate beats ( counts) per minute from a digital input without having to wait for a full minute.
Im new to timer routines - seems like this is the best route
Can anybody help?

Thanks !!

Re: How to calculate beats per minute from digital port inpu

Posted: Wed Aug 10, 2011 11:35 am
by Benj
Hello,

Your best bet may be to do some kind of rolling average. There are posts on this forum about this if you do a search.

This example may help to get you started.