| Crates.io | tap-sdk |
| lib.rs | tap-sdk |
| version | 0.1.0 |
| created_at | 2025-08-09 06:30:41.42198+00 |
| updated_at | 2025-08-09 06:30:41.42198+00 |
| description | TAP rust SDK allows you to build rust app that can establish BLE connection with Tap Strap and TapXR, send commands and receive events and data. |
| homepage | |
| repository | https://github.com/VladChekunov/tap-rust-sdk |
| max_upload_size | |
| id | 1787615 |
| size | 299,588 |
TAP rust SDK allows you to build rust app that can establish BLE connection with Tap Strap and TapXR, send commands and receive events and data - Thus allowing TAP to act as a controller for your app!
The library is currently in alpha.
Use cargo:
cargo add tap-sdk
Or clone this repo:
git clone https://github.com/VladChekunov/tap-rust-sdk
cd tap-rust-sdk
cargo build
Then just import the main class
let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
tap_client.run().await;
Note that the SDK will not scan for BLE peripherals, therefore you'll have to pair the Tap device manually with your machine.
Also make sure that you have updated your Tap device to the latest version.
This SDK implements two basic interfaces with a Tap device.
First is setting the operation mode:
Second, subscribing to the following events:
Additional to these functional event, there are also some state events, such as connection and disconnection of Tap devices to the SDK backend.
Authorized developers can gain access to the experimantal Spatial Control features:
These featureas are only available on TapXR and only for qualified developers. Request access here
The SDK uses callbacks to implement user functions on the various events. To register a callback, you just have to instance a TapSDK object and just:
fn on_tapped(identifier: Uuid, tapcode: u8) {
println!("{} tapped {}", identifier.to_short_string(), tapcode);
}
tap_client.register_tap_events(on_tapped).await;
Make sure that "Developer mode" is enabled on TapManager app for this mode to work properly In raw sensors mode, the Tap device continuously sends raw data from the following sensors:
The sensors measurements are given with respect to the reference system below.


Each sample (of accelerometer or imu) is preambled with a millisecond timestamp, referenced to an internal Tap clock.
The dynamic range of the sensors is determined with the set_input_mode method by passing a sensitivity integers list of length 3 with the following elements (by order):
Fingers accelerometers sensitivity -
| value | sensitivity | scale factor (mg/LSB) |
|---|---|---|
| 0 (default) | ±16G | 31.25 |
| 1 | ±2G | 3.91 |
| 2 | ±4G | 7.81 |
| 3 | ±8G | 15.62 |
| 4 | ±16G | 31.25 |
IMU gyro sensitivity -
| value | sensitivity | scale factor (mdps/LSB) |
|---|---|---|
| 0 (default) | ±500dps | 17.5 |
| 1 | ±125dps | 4.375 |
| 2 | ±250dps | 8.75 |
| 3 | ±500dps | 17.5 |
| 4 | ±1000dps | 35 |
| 5 | ±2000dps | 70 |
IMU accelerometer sensitivity -
| value | sensitivity | scale factor (mg/LSB) |
|---|---|---|
| 0 (default) | ±4G | 0.122 |
| 1 | ±2G | 0.061 |
| 2 | ±4G | 0.122 |
| 3 | ±8G | 0.244 |
| 4 | ±16G | 0.488 |
You can run examples by running:
just run-examples
Please refer to the issues tab!