Skip to content
Skills Library
Programming · Building & coding

tap-imu-motion

/tap-imu-motion

Use Tap hand motion - IMU motion data (dx, dy, roll, pitch, yaw) and mouse events - to move a cursor, steer, tilt, or rotate things. Use for air mouse, pointer, cursor control, tilt, orientation, euler angles, roll/pitch/yaw, or motion-driven UI.

Licence
MIT
Last repository change
20.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
5
Deprecation

No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use Tap hand motion - IMU motion data (dx, dy, roll, pitch, yaw) and mouse events - to move a cursor, steer, tilt, or rotate things. Use for air mouse, pointer, cursor control, tilt, orientation, euler angles, roll/pitch/yaw, or motion-driven UI.

Original author description

Use Tap hand motion - IMU motion data (dx, dy, roll, pitch, yaw) and mouse events - to move a cursor, steer, tilt, or rotate things. Use for air mouse, pointer, cursor control, tilt, orientation, euler angles, roll/pitch/yaw, or motion-driven UI.

How it works

  1. TapSDK2: IMU motion feature
  2. TapSDK: mouse events
  3. Patterns
  4. Axes
  5. Docs
Original SKILL.md headings · 87 lines, 384 words
SKILL.md preview
---
name: tap-imu-motion
description: Use Tap hand motion - IMU motion data (dx, dy, roll, pitch, yaw) and mouse events - to move a cursor, steer, tilt, or rotate things. Use for air mouse, pointer, cursor control, tilt, orientation, euler angles, roll/pitch/yaw, or motion-driven UI.
---

# IMU motion and mouse

Firmware gives motion in two ways. Use `hasattr` to pick the API.

## `TapSDK2`: IMU motion feature

TapXR developer firmware and TapBand (same BLE API; TapBand is coming soon).

```python
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.
- Turn off with `set_feature(DeviceFeatures.IMU_MOTION_DATA, False)` to save battery and bandwidth.
- Motion works together with `MODEL_DETECTION` (air gestures). The `tap-knob` and `tap-dpad` skills combine them.

## `TapSDK`: mouse events

Tap Strap and Tap Strap 2.

```python
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`).
- TapXR Spatial Control: `await sdk.set_input_type(InputType.MOUSE)` forces air-mouse; `InputType.AUTO` returns to automatic.

## Patterns

**Cursor on a canvas** (clamp to bounds, optional gain):

```python
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:

```python
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.

## Axes

- Tap Strap: https://raw.githubusercontent.com/TapWithUs/tap-python-sdk/master/docs/assets/TAP-axis-alpha.png
- TapXR: https://raw.githubusercontent.com/TapWithUs/tap-python-sdk/master/docs/assets/TAPXR-axis.png

If a direction is inverted on the user's device, flip the sign. Ask the user to test and tell you.

## Docs

- TapSDK2 events: https://tapwithus.github.io/tap-python-sdk/latest/v2/reference/events/
- TapSDK events: https://tapwithus.github.io/tap-python-sdk/latest/v1/reference/events/
- Spatial Control (TapXR): https://tapwithus.github.io/tap-python-sdk/latest/v1/how-to/use-spatial-control/

Versions

The database has no other skills named tap-imu-motion.

Database snapshot: 13.11.2026 · package version 4e862e4ab513 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100tap-android-imu-motion
    Use Tap hand motion on Android — ImuMotionPacket (dx, dy, roll, pitch, yaw) on the framed protocol and MousePacket on classic firmware — to move a cursor, steer, tilt, or rotate. Use for air mouse, pointer, cursor, tilt, euler angles, or motion-driven UI. Requires…
  • 100tapkit-motion
    Use TAP hand motion from moused velocities and tapDidChangeOrientation roll, pitch, and yaw to move a cursor, tilt, or rotate. Use for air mouse, pointer, cursor, AssistiveTouch, or orientation.
  • 100esp32-imu-calibration-frame
    Use when reviewing or implementing esp32 imu calibration frame on an ESP32 target.
  • 100attitude-controller-planner
    Use this skill when implementing the inner control loop for a quadrotor — attitude (roll/pitch/yaw) PID control and attitude planning (converting desired acceleration to desired Euler angles). Covers gain layout, integral reset pattern, and the attitude planner inverse kinematics.
  • 100tap-raw-sensors
    Stream raw accelerometer and gyroscope samples from a Tap (InputModeRaw or RAW_IMU_DATA), set sensitivity and scaling, log to CSV, and plot. Use for raw sensors, raw IMU, accelerometer, gyro, data logging, datasets, custom gesture recognition, or research.
  • 100device-features
    Use G2 hardware features in Even Hub apps — microphone audio capture (glasses or phone mic), IMU motion data, location (one-shot and continuous), phone album picker / camera capture, device info, user info, and local storage. Use when working with audio, IMU, location, photos,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.