Hasty Briefsbeta

Bilingual

My Homepage Has a Pulse

6 hours ago
  • #Personal Website
  • #Health Tracking
  • #DIY Projects
  • The author added a beating heart widget to their homepage that displays their actual heart rate (e.g., 48 bpm) from their Garmin Descent Mk3i dive watch, with the heart pulsing at that frequency.
  • The widget replays yesterday's heart rate data (not live) due to limitations: the watch syncs data in batches, and the static site cannot host a real-time feed. Data is fetched daily via a Python script using the unofficial python-garminconnect library.
  • Key technical details: OAuth tokens are used for authentication (refreshed yearly), timezone handling ensures accurate 'yesterday' data, and client-side JavaScript interpolates between 2-minute samples to create a smooth, real-time-like display.
  • Interpolation includes safeguards: gaps longer than 20 minutes (e.g., when the watch is off) hide the widget to avoid showing fabricated data, and midnight wraparound prevents data loss.
  • The heartbeat animation uses CSS keyframes to mimic a systolic/diastolic cycle, scaling based on the BPM, and respects user motion preferences. The system has no ongoing costs or battery impact on the watch.