Use the code provided by the maker: pulsesensor.com
The sensor measures the time between beats, averages the last 10 beats, then divides 60000 by the average, and that is the BPM.
I'm working in a project that takes the real-time of the interbeats (IBI) to find the Heart Rate Variation.