<?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: Carl Kho</title>
    <description>The latest articles on DEV Community by Carl Kho (@carlkho).</description>
    <link>https://dev.to/carlkho</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%2F4259414%2F58c6a5b7-7c92-46b2-8237-9f9a77fd61d5.png</url>
      <title>DEV Community: Carl Kho</title>
      <link>https://dev.to/carlkho</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carlkho"/>
    <language>en</language>
    <item>
      <title>Pulse Break: a 60-second camera check-in between focus blocks</title>
      <dc:creator>Carl Kho</dc:creator>
      <pubDate>Sun, 22 Nov 2026 23:24:12 +0000</pubDate>
      <link>https://dev.to/carlkho/pulse-break-a-60-second-camera-check-in-between-focus-blocks-1k17</link>
      <guid>https://dev.to/carlkho/pulse-break-a-60-second-camera-check-in-between-focus-blocks-1k17</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&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;Pulse Break is a small terminal app for the gap between two blocks of focused work. You run it, look at your camera for a minute, and the SmartSpectra SDK reads your pulse and breathing rate from the video. At the end, Pulse Break compares those two numbers with your own recent check-ins. If you are clearly running warmer than your usual, it suggests a five-minute break before the next block. If not, it tells you to keep going.&lt;/p&gt;

&lt;p&gt;The comparison is against you, not against a chart. A pulse of 80 means different things for different people, so the app asks only one question: is this check-in noticeably above what is normal for me?&lt;/p&gt;

&lt;p&gt;I work on biosignal input at Somach Systems, where the sensors are EMG electrodes on the skin. A tool that gets pulse and breathing from the webcam already on the desk, with nothing to wear, was the part of this challenge I wanted to try.&lt;/p&gt;

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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Xldyvg1omy0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The demo runs on a recorded clip of me (from 2026-11-02, sound removed), not on a live camera. The SDK reads the clip at the clip's own frame rate, so the readings arrive the way they would from a webcam. On the left is the footage the SDK reads; on the right is the app's terminal, drawn live from the SDK's metrics and lined up with the clip's clock. Nothing in the terminal panel was edited. The two earlier check-ins in the history at the end are also recorded clips of me.&lt;/p&gt;

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


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Somach-Systems-Inc" rel="noopener noreferrer"&gt;
        Somach-Systems-Inc
      &lt;/a&gt; / &lt;a href="https://github.com/Somach-Systems-Inc/pulse-break" rel="noopener noreferrer"&gt;
        pulse-break
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A 60-second camera check-in between focus blocks: pulse and breathing rate from the Presage SmartSpectra SDK, compared with your own usual.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Pulse Break&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A 60-second check-in for the gap between two focus blocks. You look at your camera, the
&lt;a href="https://smartspectra.presagetech.com/docs" rel="nofollow noopener noreferrer"&gt;Presage SmartSpectra SDK&lt;/a&gt; reads your pulse and
breathing rate from the video, and Pulse Break compares the result with your own recent
check-ins. If you are running clearly warmer than your usual, it suggests a five-minute break
before the next block. Otherwise it tells you to keep going.&lt;/p&gt;
&lt;p&gt;It is a terminal app built on the SDK's Node.js binding. Everything it shows comes from the
SDK's live metrics while the check-in runs.&lt;/p&gt;
&lt;p&gt;Demo video (runs on a recorded clip of me, see below): &lt;a href="https://youtu.be/Xldyvg1omy0" rel="nofollow noopener noreferrer"&gt;https://youtu.be/Xldyvg1omy0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/Somach-Systems-Inc/pulse-break/docs/screenshot.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FSomach-Systems-Inc%2Fpulse-break%2FHEAD%2Fdocs%2Fscreenshot.png" alt="Pulse Break during a check-in"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What you see&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Camera check&lt;/strong&gt;: the SDK's own readiness message for every frame ("Face the camera."
"Hold still - motion"). The progress bar turns yellow while the SDK asks for an adjustment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pulse&lt;/strong&gt;: the latest pulse rate, whether the SDK marks it steady or still settling…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Somach-Systems-Inc/pulse-break" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Setup is in the README: Node.js 20.12 or later, &lt;code&gt;npm install&lt;/code&gt;, a free Presage API key in &lt;code&gt;.env&lt;/code&gt;, then &lt;code&gt;node src/cli.mjs&lt;/code&gt;. To try it without a camera, &lt;code&gt;node src/cli.mjs --video your-clip.mp4&lt;/code&gt; reads a recording of yourself instead.&lt;/p&gt;

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

&lt;p&gt;Signals used: &lt;strong&gt;pulse rate&lt;/strong&gt; and &lt;strong&gt;breathing rate&lt;/strong&gt;, plus the SDK's chest-motion trace and its per-frame readiness hints.&lt;/p&gt;

&lt;p&gt;While a check-in runs, the dashboard redraws up to ten times a second:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Camera check&lt;/strong&gt; shows the SDK's own validation message for each frame ("Face the camera.", "Hold still - motion"). The progress bar turns yellow while the SDK is asking for an adjustment, so you can see at a glance when to sit still.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pulse&lt;/strong&gt; shows the latest rate, whether the SDK marks it steady or still settling, its confidence, and a trend line with the range it covers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breathing&lt;/strong&gt; shows the latest rate and the last 12 seconds of the chest-motion waveform.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the time is up, it takes the median of the steady pulse readings and the median breathing rate, and compares them with the median of your last seven check-ins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pulse 10 bpm or more above your usual, or breathing 4 or more breaths a minute above it: "Running warmer than usual. Good moment for a 5-minute break."&lt;/li&gt;
&lt;li&gt;clearly below your usual on one signal and not above it on the other: "Calmer than your usual. Keep going."&lt;/li&gt;
&lt;li&gt;anything else: "Close to your usual. Keep going."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first two check-ins only build your usual. The thresholds are round numbers chosen to be easy to explain, not clinical cut-offs, and they live in one small file with unit tests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The integration&lt;/strong&gt; is in &lt;code&gt;src/session.mjs&lt;/code&gt;. It uses the Node SDK (&lt;code&gt;@smartspectra/node-sdk&lt;/code&gt; 3.5.0) with &lt;code&gt;requestedMetrics: [...breathingMetrics, ...cardioMetrics]&lt;/code&gt;, then &lt;code&gt;useCamera(CameraSelection.default)&lt;/code&gt; for a live check-in or &lt;code&gt;useFile()&lt;/code&gt; for a recording. The &lt;code&gt;validationStatus&lt;/code&gt; event drives the readiness line. Each &lt;code&gt;metrics&lt;/code&gt; packet goes through &lt;code&gt;decodeMetrics&lt;/code&gt;, and the app reads &lt;code&gt;cardio.pulseRate&lt;/code&gt; (value, &lt;code&gt;stable&lt;/code&gt; flag, confidence), &lt;code&gt;breathing.rate&lt;/code&gt; and &lt;code&gt;breathing.upperTrace&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Two things I learned on the way:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;My laptop-webcam framing (head and shoulders) failed the SDK's framing check with "Place more of the chest in view", and while it failed, no pulse came out at all. For the recorded clip, adding a black band below the frame let the check pass. The pulse still comes from the face. The README has the one-line ffmpeg command.&lt;/li&gt;
&lt;li&gt;Reading a file as fast as possible got through a 25-second clip in about two seconds, before the SDK had finished loading one of its models. Pacing the file at its own frame rate (&lt;code&gt;interframeDelayMs&lt;/code&gt;) gives the SDK the same timing a camera would.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;&lt;strong&gt;Best Thoughtful Real-World Use.&lt;/strong&gt; The need is small on purpose: a quick way to notice, between two blocks of work, whether you are running warmer than usual, using only the webcam that is already there. I designed for that: one command, one minute, one line of advice, numbers compared only with your own, a consent question before every check-in, and nothing saved except two numbers per check-in.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consent:&lt;/strong&gt; every check-in starts by saying what will be read (the camera, or a named video file), for how long, and what is kept, then asks "Turn on the camera? [y/N]". The default is no, and the camera is not opened before you answer. A &lt;code&gt;--yes&lt;/code&gt; flag skips the question for scripted runs; the demo run used it, and the screen says so.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video frames:&lt;/strong&gt; go from the camera (or file) into the SDK inside the app's process. Pulse Break never writes frames, images or video to disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; one line per check-in in &lt;code&gt;~/.pulse-break/history.jsonl&lt;/code&gt;: the time, a source label, median pulse, median breathing rate, how many readings, and seconds measured. The folder is created with owner-only permissions. The SDK's error log goes to &lt;code&gt;~/.pulse-break/sdk.log&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retention and deletion:&lt;/strong&gt; the history stays on your computer until you run &lt;code&gt;pulse-break forget&lt;/code&gt; or delete the folder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sharing:&lt;/strong&gt; the app sends nothing anywhere itself. The SDK authenticates with Presage using your API key (usage is metered in credits per account, so its requests are tied to your account and device) and downloads the models it runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDK telemetry:&lt;/strong&gt; off by default (&lt;code&gt;enableTelemetry: false&lt;/code&gt;); &lt;code&gt;--telemetry&lt;/code&gt; turns it on. Presage's &lt;a href="https://smartspectra.presagetech.com/docs/telemetry-and-privacy" rel="noopener noreferrer"&gt;telemetry notes&lt;/a&gt; say telemetry never attaches raw frames or measured values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI services:&lt;/strong&gt; none. The app does not call the SDK's optional insight feature or any other model service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not medical:&lt;/strong&gt; Pulse Break is a nudge about your own pattern. It makes no diagnosis or treatment claims and is not for medical decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Footage:&lt;/strong&gt; the demo footage is of me only.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
      <category>node</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
