Modelling Heartbeats Using Arduino

Heartbeats can be seen on an electrocardiograph in a form something like this:


A healthy heart beats about 70 – 100 times per minute depending upon a person’s age, physical condition, lifestyle and habits.

Ideally under perfect conditions a heart should beat 72 times per minute. This means that one heart beat takes about 0.8 seconds. Further a single heart beat comprises of two sounds (a lub and a dub). Listen to the following video with earphones to hear distinctly the lub (also called S1 sound) and dub (also called S2 sound) of heartbeat.

Now, the task is to represent the lub and the dub with two LEDs (one LED each) and write a code that makes LEDs blink in similar fashion. You can attach one LED on pin 13 and the other one on pin 12.

You can refer to the following code in case you face a difficulty.

Once you’ve made this you can record a video and share with us at [email protected] . It would be convenient if you upload it to YouTube first and share the link with us. Kudos! 🙂

Post ref: #C68M3K1.BA