/tap-python-sdk:tap-imu-motionfrom tap-python-sdk
Processes Tap hand motion IMU data (dx, dy, roll, pitch, yaw) and mouse events for cursor control, steering, tilting, or rotating UI elements. Useful for air mouse, pointer, orientation, and motion-driven interfaces.
Ships in tap-python-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Firmware gives motion in two ways. Use hasattr to pick the API.
TapSDK2: IMU motion featureTapXR developer firmware and TapBand (same BLE API; TapBand is coming soon).
from tapsdk import DeviceFeatures
def on_motion(identifier, motion):
dx, dy, is_mouse, (roll, pitch, yaw) = motion
...
sdk.register_imu_motion_data_events(on_motion)
await sdk.start()
await sdk.set_feature(DeviceFeatures.IMU_MOTION_DATA, True)
dx, dy: signed int pointer deltas since the last packet. Add them to a cursor position.is_mouse: True when the device considers the motion a pointer movement.roll, pitch, yaw: signed ints, orientation in degrees.set_feature(DeviceFeatures.IMU_MOTION_DATA, False) to save battery and bandwidth.MODEL_DETECTION (air gestures). The tap-knob and tap-dpad skills combine them.TapSDK: mouse eventsTap Strap and Tap Strap 2.
from tapsdk import InputModeController
def on_mouse(identifier, vx, vy, proximity):
...
sdk.register_mouse_events(on_mouse)
await sdk.start()
await sdk.set_input_mode(InputModeController())
vx, vy: signed velocities. proximity: True when a surface is detected (optical mouse on Tap Strap).TapSDK mouse events have no euler angles. For orientation, use raw IMU (tap-raw-sensors).await sdk.set_input_type(InputType.MOUSE) forces air-mouse; InputType.AUTO returns to automatic.Cursor on a canvas (clamp to bounds, optional gain):
GAIN = 1.0
x, y = 400, 300
def on_motion(identifier, motion):
global x, y
dx, dy, _, _ = motion
x = min(max(x + dx * GAIN, 0), WIDTH)
y = min(max(y + dy * GAIN, 0), HEIGHT)
Relative rotation (roll as a dial): store a reference roll when the user starts (for example on a pinch-hold), then use roll - reference. Do not use absolute roll; it depends on how the hand is held. See tap-knob.
Smoothing: an exponential moving average removes jitter:
alpha = 0.3
smooth = alpha * value + (1 - alpha) * smooth
Dead zone: ignore abs(dx) + abs(dy) < 2 to stop drift when the hand is still.
Rate: count packets per second if timing matters (see examples/features.py in the repo). Do not assume a fixed rate.
If a direction is inverted on the user's device, flip the sign. Ask the user to test and tell you.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tapwithus/tap-python-sdk --plugin tap-python-sdk8 skills in this plugin
/tap-build-an-appBuild a complete app or interactive experience controlled by a Tap - games, browser pages, presentations, media control, keyboard shortcuts, or creative tools. Use when the user asks to "build", "make", or "create" something with their Tap, especially if they are not a developer./tap-dpadBuild a D-Pad style controller with a Tap - swipes for directions, short pinches to select, pinch-hold that locks into rotate (twist) or drag (move) mode, fist-hold to hide. Use for D-Pad, menu navigation, select and move, drag and drop, rotate objects, or game controls with gestures./tap-getting-startedFirst skill for any Tap app. The connect order is await connect(), then register_* callbacks, then await sdk.start(), then enable input. connect() alone delivers no taps. Use for install, pairing, "connect to my Tap", setup, or no tap events.Other plugins' skills for the same job