<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Worsley Labwes</title>
    <description>The latest articles on DEV Community by Worsley Labwes (@worsley).</description>
    <link>https://dev.to/worsley</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3318950%2Ff550e4b6-33b1-4f47-ae6e-76618af27daa.png</url>
      <title>DEV Community: Worsley Labwes</title>
      <link>https://dev.to/worsley</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/worsley"/>
    <language>en</language>
    <item>
      <title>Pulse Defuse: a bomb that listens to your heartbeat</title>
      <dc:creator>Worsley Labwes</dc:creator>
      <pubDate>Sat, 21 Nov 2026 19:42:24 +0000</pubDate>
      <link>https://dev.to/worsley/pulse-defuse-a-bomb-that-listens-to-your-heartbeat-2m3p</link>
      <guid>https://dev.to/worsley/pulse-defuse-a-bomb-that-listens-to-your-heartbeat-2m3p</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/devteam/join-the-presage-smartspectra-sdk-challenge-3000-in-prizes-across-10-winners-1370"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pulse Defuse&lt;/strong&gt; is a desktop game where you defuse a bomb by staying calm. Your webcam reads your pulse and breathing through the SmartSpectra SDK. Panic and the clock drains faster, the wires shake harder, and the heartbeat sound gets higher. Stay steady for a few seconds and a wire is cut.&lt;/p&gt;

&lt;p&gt;It also has &lt;strong&gt;Stillpoint&lt;/strong&gt;, a 3-minute paced-breathing game mode (4 seconds in, 6 seconds out) that scores how closely your breathing matches the pace.&lt;/p&gt;

&lt;p&gt;Everything is relative to &lt;em&gt;your own&lt;/em&gt; resting baseline, measured in a short calibration step, so the game is fair to every body.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Demo Video: &lt;a href="https://youtu.be/q6jpJmh-MCA" rel="noopener noreferrer"&gt;https://youtu.be/q6jpJmh-MCA&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(image.png)&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;GITHUB REPO LINK: &lt;a href="https://github.com/Worsley-Labwes/heartbeat-defuse" rel="noopener noreferrer"&gt;https://github.com/Worsley-Labwes/heartbeat-defuse&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The SDK integration is in &lt;code&gt;electron/main.cjs&lt;/code&gt;. Setup instructions are in the README.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;SDK value&lt;/th&gt;
&lt;th&gt;What it does in the game&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cardio.pulseRate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Game tension, clock drain, wire shake&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;breathing.rate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Part of tension; Stillpoint pace score&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cardio.arterialPressureTrace&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Live "Pulse wave" scope and beat detection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;breathing.upperTrace&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Live "Breathing wave" scope&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Design decisions that come from how the signal behaves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I only use values the SDK marks &lt;code&gt;stable&lt;/code&gt;, and smooth them with a rolling median.&lt;/li&gt;
&lt;li&gt;Tension is measured against your own resting baseline, not a fixed number.&lt;/li&gt;
&lt;li&gt;The SDK runs in Electron's main process. The page only receives numbers, so a busy UI can't stall the camera.&lt;/li&gt;
&lt;li&gt;The readings lag, so the game says so and pauses the clock if the signal is lost.&lt;/li&gt;
&lt;li&gt;The heartbeat sound has two modes, shown live on screen. In my test run it was paced to the smoothed pulse rate. It switches to beat-locked sound only when beats detected in the pulse waveform arrive promptly and agree with the measured rate, and otherwise stays with the average rate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consent:&lt;/strong&gt; nothing starts until the player ticks a consent box and presses &lt;em&gt;Turn on camera&lt;/em&gt;. A permanent "Camera on" indicator and a Stop button are always visible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is read:&lt;/strong&gt; pulse and breathing rate, plus the pulse and breathing waveforms, from the webcam, only while the game is open.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage by this app:&lt;/strong&gt; none. No video, images or readings are saved. Values live in memory and disappear when the app closes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage by the SDK:&lt;/strong&gt; the SmartSpectra SDK keeps a device key file (and related SDK data) on the PC under &lt;code&gt;%LOCALAPPDATA%\Presage\Physiology\&lt;/code&gt;. This app does not read it. On Windows, if the SDK cannot read its saved key back, the app moves that file aside (as &lt;code&gt;device_keys.secure.bak&lt;/code&gt;) so the SDK can create a new one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retention and deletion:&lt;/strong&gt; this app retains nothing. To remove the SDK's files, close the app and delete the &lt;code&gt;Presage&lt;/code&gt; folder under &lt;code&gt;%LOCALAPPDATA%&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sharing and network use:&lt;/strong&gt; the app has no backend, accounts or analytics. The SmartSpectra SDK contacts Presage's servers (to register the device and download its measurement model). I could not confirm from Presage's documentation exactly what is sent during measurement, so see Presage's Telemetry and Privacy documentation for the authoritative answer. Per the SDK's own code documentation, its optional telemetry can contain free text, paths and platform context, can be linked to an account or device, and does not include raw frames or measured vitals. This app turns telemetry off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDK telemetry:&lt;/strong&gt; the SDK's &lt;code&gt;enableTelemetry&lt;/code&gt; option defaults to on. This app sets it to &lt;code&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional AI services:&lt;/strong&gt; none.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not medical:&lt;/strong&gt; this is a game. It makes no diagnosis, treatment or health claims.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Most Creative or Delightful Use:&lt;/strong&gt; your own pulse and breathing are the game controller.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Thoughtful Real-World Use:&lt;/strong&gt; consent-first design, no retention by the app, honest limits, and a paced-breathing game mode that makes no health claims.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing instructions for judges
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;You need Windows 10 or 11, Node 20+ and a webcam.&lt;/li&gt;
&lt;li&gt;Get a free SmartSpectra API key from the Presage developer portal (my key is not included in the repo).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git clone https://github.com/Worsley-Labwes/heartbeat-defuse&lt;/code&gt;, then &lt;code&gt;cd pulse-defuse&lt;/code&gt; and &lt;code&gt;npm install&lt;/code&gt;. It downloads the SDK's native runtimes, so it is large.&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt; and paste your key after &lt;code&gt;SMARTSPECTRA_API_KEY=&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm run dev&lt;/code&gt;. Tick the consent box and click &lt;strong&gt;Turn on camera&lt;/strong&gt;. Face the camera with your face and upper chest in view and good light on your face. Calibration takes about 20 to 40 seconds.&lt;/li&gt;
&lt;li&gt;No camera? &lt;code&gt;npm run web&lt;/code&gt; opens the UI with a clearly labelled &lt;strong&gt;simulated&lt;/strong&gt; signal. It is for browsing the interface only and does not use the SDK.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Breathing is a weaker signal than pulse, so pulse drives the main game.&lt;/li&gt;
&lt;li&gt;Measurement involves Presage's servers and takes time, so readings lag, and the app displays the delay.&lt;/li&gt;
&lt;li&gt;On one Windows machine the SDK could not read back its saved device key, so the app moves that file aside after that specific failure (see Consent and Data Handling).&lt;/li&gt;
&lt;li&gt;A simulated-signal mode exists only for development without a camera. It is always labelled and is not used in the demo.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>presagechallenge</category>
    </item>
  </channel>
</rss>
