Heart-rate reactive LED shirt
A heart-shaped ring of LEDs on your shirt pulses in time with your real heartbeat. A Seeed XIAO ESP32-C3 reads a COOSPO H6 Bluetooth chest strap and changes color from calm blue to racing red as your heart rate rises.

Safety first
- This is a fun light show, not a medical device. Do not use it to monitor a health condition.
- Cap brightness at about 30% so the LEDs stay cool against your body and the power bank lasts.
- Remove all electronics before washing the shirt.
- Keep wires short and secured so they cannot catch on anything while you move.
Parts
| Part | Qty | Approx. each | Subtotal |
|---|---|---|---|
| COOSPO H6 Bluetooth heart rate monitor chest strapUses the standard Bluetooth LE Heart Rate Service, so any strap that does the same will work. Typical $25-40, no verified link.Amazon (search) | 1 | $30 | $30 |
| Seeed Studio XIAO ESP32-C3Tiny board with Bluetooth LE and USB-C. Typical $5-9, no verified link.Amazon (search) | 1 | $6 | $6 |
| BTF-LIGHTING WS2812B LED strip, 60 LED/m, 1 mAbout 30 LEDs cut into a heart outline. Typical $8-14, no verified link.Amazon (search) | 1 | $10 | $10 |
| Silicone-insulated 26 AWG wire kitTypical $7-13, no verified link.Amazon (search) | 1 | $10 | $10 |
| Anker PowerCore 5000 USB power bankSkip if you already own one. Any small power bank that does not auto-shut-off at low current. Typical $15-24, no verified link.Amazon (search) | 1 | $18 | $18 |
| Sew-on snap fasteners and Velcro strips kitTypical $6-10, no verified link.Amazon (search) | 1 | $8 | $8 |
| Black craft felt sheets (pack)Backing for the LED heart. Typical $4-8, no verified link.Amazon (search) | 1 | $6 | $6 |
| Plain cotton T-shirtSkip if you already own one. Typical $5-12, no verified link.Amazon (search) | 1 | $8 | $8 |
| Estimated total (parts only) | $96 | ||
Typical US prices, checked 2026-11-12. Prices change and multi-packs are often cheaper per piece.
As an Amazon Associate I earn from qualifying purchases. Prices change; check the store.
Filament
PLA (1.75 mm): about 25 g (8.4 m), roughly 2 h of printing.
PLA, 0.2 mm layers, 20% infill, 2 walls; small pocket box with rounded edges.
AI agents you'll use
- Code helper (ChatGPT, Claude, Gemini or Grok): Writes the XIAO ESP32-C3 sketch: scan for the strap, subscribe to heart-rate notifications, and drive a beat animation with FastLED.
- Color design helper: Picks heart-rate zones and colors for your age and activity and turns them into a simple color map.
Tools
- Soldering iron
- Wire stripper
- Needle and thread, or fabric glue
- USB-C data cable
What you'll learn
- Reading a standard Bluetooth LE heart-rate service
- Animating LEDs from live data
- Wearable wiring that survives movement
- Power budgets for battery LEDs
Wear your heartbeat. At rest the heart glows a slow blue; dance, run or watch a scary movie and it speeds up and turns red. It is a crowd favorite at parties and races.
What you'll build
About 30 LEDs from a WS2812B strip, cut into short segments and soldered with flexible wire into a heart outline, sewn or snapped to the inside of a T-shirt so they glow through the fabric. A XIAO ESP32-C3 in a small pocket box connects to the chest strap over Bluetooth LE, reads beats per minute, and pulses the heart at that rate. A power bank in a pocket runs it.
The cost range is $60-110. The low end assumes you already own these items marked "skip if you already own one": Anker PowerCore 5000 USB power bank, Plain cotton T-shirt. The high end includes them.
Print the parts
Print a small rounded box for the XIAO with a cable exit. A strap clip is optional.
Wiring
| From | To | Notes |
|---|---|---|
| Power bank USB | XIAO USB-C | XIAO 5V pin then feeds the LEDs. |
| XIAO 5V / GND | LED strip 5V / GND | Keep brightness low; 30 LEDs at 30% draw well under 1 A. |
| XIAO D10 (GPIO10) | LED strip DIN | Short wire. Add a 330 ohm resistor in series if it flickers. |
Step-by-step
- Pair-test: flash a BLE scan sketch and check the strap shows up when worn (it needs skin contact to start).
- Subscribe to the Heart Rate Measurement characteristic and print BPM.
- Cut the strip into short segments and wire them into a heart outline on a piece of felt.
- Write the beat animation and the color map from the helper.
- Attach the felt heart inside the shirt with snaps or Velcro, and the box in a pocket.
- Test while walking, then jogging.
Code
Arduino-ESP32 for the XIAO ESP32-C3 with NimBLE-Arduino (BLE client) and FastLED.
Prompt for the code helper:
Write an Arduino sketch for a Seeed XIAO ESP32-C3 using NimBLE-Arduino: scan for a device advertising the Heart Rate Service (0x180D), connect, and subscribe to Heart Rate Measurement (0x2A37); parse the flags byte to read 8- or 16-bit BPM.
Drive 30 WS2812B on GPIO10 with FastLED at max brightness 76: pulse the whole heart once per beat, colored blue under 90 BPM, purple 90-130, red above 130. Reconnect automatically, and show a slow breathing white if no strap is connected.
Troubleshooting
- Strap never appears: It only advertises when worn with damp electrodes. Wet the pads and wear it.
- Heart pulses irregularly: Use the BPM value to time the pulse rather than waiting for each notification.
- Power bank turns off: Its low-current auto-off triggers. Use a bank with an always-on mode.
Files, code and docs
- NimBLE-Arduino (Bluetooth LE library) (Apache-2.0)
- FastLED library (MIT)
- Bluetooth SIG Heart Rate Service specification (Vendor docs)
Last checked 2026-11-12. Double-check parts against your own board and seller listings before you buy.