Web Bluetooth demos for Shimmer sensor devices, running entirely in the browser with no native app required.
Migration note — this branch replaces the local
shimmer3r.js/verisense.jsfiles with the publishedshimmer-web-sdkpackage. If you need the pre-migration setup, check out the v0.0.1 release tag.
Pre-Alpha Release — these demos and the SDK are early-stage software. What that means from a support perspective is described here. If you encounter technical issues, or would like to express interest in shaping future development, please reach out to the Shimmer support team. If sufficient interest is registered, we may prioritise building a more fully scoped and robust API.
break-gyro/ ┐
break-emg/ │
punch-highG/ │
brick/ │
rythmgame-emggyro/ │ Shimmer3R demos
video-ppg/ │
spell-gyro/ │
consensys-export/ ┘
Verisense/ ← Verisense demo
ShimmerCapture/ ← redirect stub only; the page moved to shimmer-capture-web
shimmer-extension/ ← Shimmer3R/Verisense Chrome extension (source; load unpacked in Chrome)
sdk-source.json ← Single source-of-truth for SDK source mode/version
update-local-sdk.ps1 ← Build + sync local SDK artifacts
sync-local-sdk.ps1 ← Sync-only local SDK artifacts
update-local-sdk.cmd ← Windows CMD launcher for update script
tools/ ← check-vendored-sdk.mjs, the Node check CI runs on the vendored SDK
Two of these grew past being demos and now live in dedicated repositories:
- ShimmerResearch/verisense-device-console — the full Verisense control console.
- ShimmerResearch/shimmer-capture-web
— Shimmer Capture, which took
common/(the shared UI library nothing else here imported) and theverify.ymlpass with it.ShimmerCapture/here is a redirect stub; leave it in place, published links point at it.
Requirements: Shimmer3R device, firmware ≥ v1.0.22, Chrome/Edge (Web Bluetooth for BLE; Web Serial for Classic Bluetooth/USB)
| Demo | Link |
|---|---|
| Gyro breakout game | break-gyro |
| EMG breakout game | break-emg |
| 200 G accel punch detector | punch-highG |
| EMG + Gyro rhythm game | rythmgame-emggyro |
| PPG heart-rate visualiser | video-ppg |
| Two-device gyro brick game | brick |
| Spell caster (gyro gestures) | spell-gyro |
| Consensys trial export + Bluetooth RTC set | consensys-export |
Consensys Export packages a logged Shimmer3/Shimmer3R trial into the Consensys import folder structure, zips it, and shares it. It also sets the device real-time clock over Bluetooth. Best on a Chromium browser (Chrome/Edge); on iPhone/iPad use the Bluefy app for the Bluetooth RTC feature.
Shimmer Capture — configure, stream, plot, record, browse the SD card, set device names, run the factory self-test and measure clock drift on a single Shimmer3R, over BLE, Classic Bluetooth or USB-C. It moved to its own repository: shimmer-capture-web, live at shimmerresearch.github.io/shimmer-capture-web.
Requirements: Verisense device (IMU or Pulse+), Chrome/Edge
| Demo | Link |
|---|---|
| Wrist sensor (accel + GSR streaming) | Verisense |
| Verisense Device Console (full SDK operations) | verisense-device-console |
Shimmer Companion Chrome extension — a locally loaded Chrome extension for streaming PPG and GSR, capturing screenshots and media context, generating session reports, and optionally adding on-device webcam face/head-state analysis. It supports selecting between multiple cameras and uploading session files to a compatible ASM Cloud deployment. See the extension README for installation, privacy, export, and server requirements.
Load via chrome://extensions → Developer mode → Load unpacked. This is optional and is not required for running the web demos in this repository.
- Chrome or Edge (Web Bluetooth support required)
- VS Code with the Live Server extension
- Node.js and npm (required when
sdk-source.jsonuseslocal-repo,local-version, orlocal-latest) - This repo (
webBLEDemos) checked out next toshimmer-web-sdk(required byupdate-local-sdk.ps1/sync-local-sdk.ps1unless you pass a custom-SdkRepoPath)
Expected folder layout:
.../shimmer-web-workspace/
shimmer-web-sdk/
webBLEDemos/
If your folders are not siblings, use:
powershell -ExecutionPolicy Bypass -File .\update-local-sdk.ps1 -SdkRepoPath "C:\path\to\shimmer-web-sdk"Every page imports the SDK from the shared vendor/ directory at the
repository root, e.g. ../vendor/shimmer-web-sdk.esm.js. The Chrome extension
keeps its own copy at shimmer-extension/vendor/ because only that folder is
packed for the store — see vendor/README.md. The file that controls where
vendor artifacts come from is sdk-source.json:
{
"sourceMode": "local-repo",
"version": "0.1.11"
}Supported sourceMode values:
local-repo: build/sync using the current localshimmer-web-sdkcheckoutlocal-version: build/sync from a specific local SDK git tag usingversion(for example0.1.7resolves tov0.1.7)local-latest: build/sync from the latest local SDKv*git tag
In all modes, demos still import from the same vendored files already in this repo; sourceMode only changes which SDK source is used to generate those vendored files before sync.
How version is used:
- With
local-repo,versionis ignored (the current local SDK checkout is used). - With
local-version,versionis required and selects the SDK tag to build (for example0.1.7->v0.1.7). - With
local-latest,versionis ignored (latest localv*tag is used).
If you are using local SDK changes, rebuild and sync the vendored SDK files:
Script reference:
| Script | What it does | Typical use |
|---|---|---|
update-local-sdk.ps1 |
Uses sdk-source.json; builds SDK only for local-repo, then syncs vendor artifacts |
Main workflow after SDK/source changes |
sync-local-sdk.ps1 |
Uses sdk-source.json to sync vendor artifacts only (no build) |
You already built SDK elsewhere |
update-local-sdk.cmd |
Windows CMD launcher for update-local-sdk.ps1 |
Double-click or cmd.exe usage |
powershell -ExecutionPolicy Bypass -File .\update-local-sdk.ps1First run only (installs dependencies before build):
powershell -ExecutionPolicy Bypass -File .\update-local-sdk.ps1 -InstallDepsIf Node.js/npm is not installed and you only want to sync already-built vendor artifacts:
powershell -ExecutionPolicy Bypass -File .\update-local-sdk.ps1 -SkipBuildUse a specific SDK version (for example 0.1.7) from one place:
- Set
"sourceMode": "local-version"insdk-source.json - Set
"version": "0.1.7"insdk-source.json - Run
powershell -ExecutionPolicy Bypass -File .\update-local-sdk.ps1
Switch to latest SDK from one place:
- Set
"sourceMode": "local-latest"insdk-source.json - Run
powershell -ExecutionPolicy Bypass -File .\update-local-sdk.ps1
Manual equivalent:
cd ../shimmer-web-sdk
powershell -ExecutionPolicy Bypass -File .\build-local-sdk.ps1
cd ../webBLEDemos
powershell -ExecutionPolicy Bypass -File .\sync-local-sdk.ps1Then check the result with node tools/check-vendored-sdk.mjs. It loads both vendor copies in
Node and checks that every name a page imports is still exported, that SDK_VERSION matches
sdk-source.json, and that vendor/ and shimmer-extension/vendor/ are byte-identical. The
Checks workflow runs it, and the extension's own Node tests, on every pull request.
Open a demo file (for example Verisense/index.html) in VS Code and choose Open with Live Server.
Use the localhost URL opened by Live Server (commonly http://localhost:5500/...).
- Click Connect (BLE) from the demo page (user gesture is required by the browser).
- For Verisense, you can also use Connect USB (Serial).
- If BLE buttons do not work, check the URL is
http://localhost/...orhttps://...(notfile://...). - If a demo fails to import the SDK, run the sync command again from
webBLEDemosroot. - If you updated SDK code but behavior did not change, re-run
.\update-local-sdk.ps1fromwebBLEDemos.
The demos import the SDK from vendored files in this repository, using relative paths that work both on localhost and on GitHub Pages:
import { Shimmer3RClient } from "../vendor/shimmer-web-sdk.esm.js";This means:
- Local development uses the vendored SDK file without external CDN dependency.
- GitHub Pages deployments also resolve the same path under the published
webBLEDemossite. - The demos work on GitHub Pages as long as vendored SDK files are committed with the site.
The Verisense demo is no different — it sits one level down like the others:
import { VerisenseBleDevice } from "../vendor/shimmer-web-sdk.esm.js";When you make SDK changes in the sibling shimmer-web-sdk repo, run:
powershell -ExecutionPolicy Bypass -File .\update-local-sdk.ps1Windows CMD alternative:
update-local-sdk.cmdThe sync script uses sdk-source.json to copy built artifacts from shimmer-web-sdk/dist into both:
webBLEDemos/vendor— the shared copy every page importswebBLEDemos/shimmer-extension/vendor— the Chrome extension's own, which cannot import from outside its folder
Build logic is centralized in shimmer-web-sdk/build-local-sdk.ps1 and invoked by update-local-sdk.ps1.
Manual copying into vendor folders is no longer required when you use update-local-sdk.ps1 or sync-local-sdk.ps1.
The SDK source lives at ShimmerResearch/shimmer-web-sdk.