Skip to main content

Raspberry Pi Flashes Lights Based on Heartbeat in Real-time

(Image credit: Powtothemoons)

This Raspberry Pi project comes to us from a creator on Reddit known as Powtothemoons. It provides a simple way to visualize your heartbeat by synchronizing the rhythm with Phillips Hue lights.

According to Powtothemoons, the process occurs fast enough to feel almost instantaneous, describing it as though the heartbeat actually triggers the light. If you're looking for a way to monitor and observe your heartbeat, this is definitely an effective way to go about it.

Powtothemoons uses a Raspberry Pi 4 2 GB module to control the operation, and a pulse sensor from pulsesensor.com to monitor the heartbeat. The assembly is connected to a Pimoroni ADC breakout board using a Pimoroni breakout Garden HAT. This HAT makes it possible to plug breakout boards into slots to avoid soldering. If you're interested in more cool HATs, check out our list of best Raspberry Pi HATs.

The software side of the equation is mostly just a Python script that monitors input from the pulse sensor for a specific threshold. When it determines a heartbeat likely took place, the Phillips Hue lights change color.

There is a Github repository available where Powtothemoons plans to provide more pictures and code as soon as possible. In the meantime, you can check out a demo of the project in action on Reddit.