If you're looking for more than just a blinking LED and pulse waveform, then we need to get a little more advanced. This project and code will read the Pulse Sensor waveform and calculate Beats Per Minute (BPM) as well as the Interbeat Interval (IBI), which is the time between beats. The Arduino code uses a hardware Timer interrupt to measure the Pulse Sensor signal at an exact fixed rate (500Hz) in order to get high-quality BPM values. These values get sent over Serial and can be visualized by the Arduino Serial Plotter, our Processing Visualizer, or our Pulse Sensor Mac App.
For a step by step how-to, with code and examples, go to https://github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino
- Blinks LED on Pin 13 to a User's Live Heartbeat.
- "Fancy Fade Blink" an LED on Pin 5, to a User's Live HeartBeat.
- Calculates User's BPM, Beat-Per-Minute.
- Calculates User's IBI, the Interbeat Interval (Time between beats).
- Serial.print the Signal, BPM, and IBI. Use this output for our Processing Visualizer App , our Pulse Sensor Mac App, or your project!
- Tech Note: Employ's Arduino's Timer Interrupt, to keep calculate accurate BPM and IBI.
Here's an example screenshot of the Arduino Serial Plotter graphing BPM, IBI, and the raw pulse data from Pulse Sensor Amped
We also have a visualizer program that runs in Processing, a creative coding language. Here is a screenshot from our visualizer graphing BPM and raw pulse data.