Now ignoring the second peak.

Every two peak a new BPM will be calculated.
The reason for two is that a heartbeat contains two beats per full cycle.