Troubleshooting serial plotter and BPM from ecg

Which board are you using?
What is the sensor?

Think about this. First time that your signal is over 100, bpm is incremented and multiplied; so now is 6. Next time through loop, you multiply again and bpm becomes 36 (signal < 100). And the third time through loop() (signal < 100), bpm is multiplied again and becomes 216.

You also never reset bpm so it will overflow.

===
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the IDE 1.x category.