BangleApps/apps/hrmaccevents
Gordon Williams 77f925d49f Support for interface/custom files to listen directly to data coming from the Bangle
hrmaccevents now uses this feature rather than trying to access BLE directly
2023-10-20 17:04:39 +01:00
..
ChangeLog hrmaccevents - Bump version 2022-07-03 11:04:47 +02:00
README.md Add saveFile function, and ensure it uses data: URI not blobs (because they don't work in Gadgetbridge) 2023-09-14 12:43:38 +01:00
app.png Adds app for recording HRM and accelerometer events 2022-01-28 00:22:48 +01:00
custom.html Support for interface/custom files to listen directly to data coming from the Bangle 2023-10-20 17:04:39 +01:00
metadata.json hrmaccevents - Bump version 2022-07-03 11:04:47 +02:00

README.md

Record HRM and accelerometer events

Record events as they happen via bluetooth or to a file. This app can use BTHRM as a reference.

Steps for usage

  • (Optional) Install BTHRM as reference (use ECG based sensor for best accuracy).
    • Configure BTHRM to "Both"-Mode or use a version >= 0.12. This prevents data beeing lost because BTHRM can replace the HRM-events data with BTHRM data.
  • Click "Start" in browser.
  • Wait until the "Events" number starts to grow, that means there are events recorded.
  • Record for some time, since BTHRM and HRM often need some seconds to start getting useful values. Consider 2000 events a useful minimum.
  • (Recording to file) Stop the recording with a long press of the button and download log.csv with the Espruino IDE.
  • (Recording to browser) Click "Stop" followed by "Save" and store the resulting file on your device.

CSV data format

The CSV data contains the following columns:

  • Time - Current time (milliseconds since 1970)
  • Acc_x,Acc_y,Acc_z - X,Y,Z acceleration in Gs
  • HRM_b - BPM figure reported by internal HRM algorithm in Bangle.js
  • HRM_c - BPM confidence figure (0..100%) reported by internal HRM algorithm in Bangle.js
  • HRM_r - e.raw from the Bangle.on("HRM-raw" event. This is the value that gets passed to the HRM algorithm.
  • HRM_f - e.filt from the Bangle.on("HRM-raw" event. This is the filtered value that comes from the Bangle's HRM algorithm and which is used for peak detection
  • PPG_r - e.vcPPG from the Bangle.on("HRM-raw" event. This is the PPG value direct from the sensor
  • PPG_o - e.vcPPGoffs from the Bangle.on("HRM-raw" event. This is the PPG offset used to map e.vcPPG to e.raw so there are no glitches when the exposure values in the sensor change.
  • BTHRM - BPM figure from external Bluetooth HRM device (this is our reference BPM)

FIXME

The custom.html for the app uses the Puck.js lib directly when it should just use customize.js - it won't work well under Gadgetbridge and may fail on other platforms too

Creator

halemmerich