Getting Started
Install the HEXR SDK, trigger your first haptic event, and learn the core concepts — for Unity and Python.
This is a starter documentation template with the standard structure of a developer docs site. Replace the code samples, package URLs and API names with your real SDK before publishing.
Introduction
HEXR is an untethered pneumatic haptic glove that adds realistic touch to VR and mixed-reality applications. The SDK gives you a small, event-driven API: your app reports contact and force events, and HEXR drives the soft actuators on the glove — with sub-20 ms response and natural, hand-tracked movement.
This guide takes you from an empty project to your first haptic pulse in a few minutes. If you prefer to read code, jump straight to the Quickstart.
Prerequisites
- A HEXR glove and forearm driver (Glove 2.0)
- A headset with hand-tracking — Meta Quest 2 / 3 / 3S, Pico 4, or HoloLens — or an external tracker like Leap Motion (HEXR relies on this for tracking)
- Unity 2022.3 LTS or newer, or Python 3.9 or newer
- The HEXR SDK (from GitHub)
New to HEXR hardware? Pair and power on the glove first, then confirm it appears in the HEXR companion app before wiring up the SDK.
Installation
Pick your platform. In Unity, choose your runtime tutorial (OpenXR, Meta OVR or MRTK); for Python, install the library.
Each Unity integration ships as a complete tutorial project — the HEXR package plus a working demo scene. Clone the one for your runtime:
- OpenXR tutorial — Unity + OpenXR plugin
- Meta OVR tutorial — Unity + Meta OVR plugin
- MRTK tutorial — Unity + Mixed Reality Toolkit
# Example: the OpenXR tutorial
git clone https://github.com/MicrotubeTechnologies/HexR-developer-tutorial-XR.gitClone the Python repo and install its dependencies:
git clone https://github.com/MicrotubeTechnologies/HaptGlovePython.git
cd HaptGlovePython
pip install -r requirements.txtThen run AddressDiscovery.py to find your glove's Bluetooth address and set it in ExampleHaptics.py.
The Python control library talks to the glove over Bluetooth (BLE) using bleak. It's run from a clone, not yet published as a pip package — adding a pyproject.toml to the repo would enable pip install.
Quickstart
Connect to a glove and fire a short pulse when the user touches an object.
using Microtube.Hexr;
public class TouchExample : MonoBehaviour {
HexrGlove glove;
void Start() {
// Grab the right-hand glove once it's connected
glove = HexrManager.GetGlove(Hand.Right);
}
// Called from your interaction/collision logic
void OnTouch(Finger finger) {
// strength 0–1, duration in milliseconds
glove.Pulse(finger, strength: 0.8f, duration: 40);
}
}import asyncio
from bleak import BleakClient
from Haptics import Haptics
DEVICE_ADDRESS = "EC:C9:FF:45:92:86" # your glove (see AddressDiscovery.py)
CHAR_UUID = "0000ff01-0000-1000-8000-00805f9b34fb"
async def main():
haptics = Haptics("right")
async with BleakClient(DEVICE_ADDRESS) as client:
# Pressure on all fingers — intensity 0.1–1.0
data = haptics.hexr_pressure_multiple(
["Thumb","Index","Middle","Ring","Pinky"],
[True]*5, [0.8]*5, [1.0]*5)
await client.write_gatt_char(CHAR_UUID, data)
await asyncio.sleep(5)
asyncio.run(main())Always check that a glove is connected before sending events — calls to a disconnected glove are ignored, but polling in a tight loop can flood the driver. Gate feedback behind your interaction callbacks.
Core concepts
Events, not frames
HEXR is driven by discrete events — a touch, a grasp, a release — rather than per-frame polling. Send an event when something happens in your scene and let the SDK schedule the actuation.
Actuators & fingers
Each glove exposes soft pneumatic actuators mapped to the fingers. You address feedback per finger, with a strength (0–1) and a duration.
| Parameter | Type | Description |
|---|---|---|
| finger | Finger | Which finger to actuate (Thumb…Pinky) |
| strength | float 0–1 | Intensity of the pulse |
| duration | int (ms) | How long the pulse lasts |
Hand-tracking
HEXR does not track your hand on its own — it relies on external hand-tracking, either from your headset (Meta Quest 2/3/3S, Pico 4, HoloLens) or a device like Leap Motion. HEXR adds the touch-feedback layer on top of that tracking.
Ready to go deeper? Head to the Unity or Python integration guides for setup, or the API reference for the full surface.