Pulse Sensor Project

You haven't provided much detail, so I'll give a generic reply.

I assume your pulse sensor provides an electrical pulse which goes from logic low ( approx. 0 v.) to logic high (approx. 5 v.), or that you can condition the pulse sensor output to get logic levels.

So, if you are on an UNO, either pin 2 or 3 will service external interrupts. Use the "attachInterrupt()" function to set up an interrupt (It's really very easy to set up).) This interrupt will be used to record the moments at which the last 58 pulse beats occurred. To record these, set up an array of unsigned long integers which is long enough to store 58 values. Every time the interrupt occurs, use the interrupt service routine to store the current system time (the millis() function) in the last position in this array, and bump all of the other values down, with the 0-th element being pushed out the bottom.

So at the arrival of each new pulse, the time of the 58th pulse back (the one you just bumped out) is obtainable from your array, and compare it to the current millis() time. If that time is more than one minute, the last 58 pulse beats took more than a minute.

This gives you an immediate response to a slow pulse.

Hope this helps.

Good luck.

John Doner