Skip to content

Stream raw sensor data

This guide uses InputModeRaw and NUS raw notifications on TapSDK.

Enable Developer mode in the Tap Manager app first. Raw mode is available on Tap Strap / Tap Strap 2 (finger accelerometers) and Tap Strap 2 / TapXR (thumb IMU).

Enter raw mode

from tapsdk import InputModeRaw
from tapsdk.enumerations import (
    FingerAcclSensitivity,
    ImuGyroSensitivity,
    ImuAcclSensitivity,
)

tap.register_raw_data_events(on_raw)

await tap.set_input_mode(InputModeRaw(
    scaled=True,
    finger_accl_sens=FingerAcclSensitivity.G4,
    imu_gyro_sens=ImuGyroSensitivity.DPS250,
    imu_accl_sens=ImuAcclSensitivity.G4,
))

With scaled=True, accelerometer values are in mg and gyro values in mdps. With scaled=False, payloads are raw LSB counts.

Handle packets

def on_raw(identifier, packets):
    for packet in packets:
        # packet["type"]: "imu" or "accl"
        # packet["ts"]:   ms timestamp from the device clock
        # packet["payload"]: list of samples
        print(identifier, packet["type"], packet["ts"], packet["payload"])
  • imu: 6 values — gyro x/y/z then accelerometer x/y/z on the thumb.
  • accl: 15 values — 3-axis accelerometer for thumb, index, middle, ring, pinky (Tap Strap family).

Sensitivity options

See FingerAcclSensitivity, ImuGyroSensitivity, and ImuAcclSensitivity.

For coordinate frames and sampling rates, see Raw sensors explained.