Get data from an adapted Wii Balanceboard or rotary dial and stream it to labstreaminglayer.
The HIDlsl application is designed for interfacing adapted balance boards and rotary force feedback devices with a PC. It utilizes SharpDX.DirectInput for hardware communication and Lab Streaming Layer (LSL) for data streaming to other software (e.g., MATLAB).
- Detects and interfaces with adapted devices such as balance boards and rotary encoders.
- Streams data to external software in real-time using LSL.
- Configurable for multiple device types.
- Windows operating system
- Supported .NET Framework
- Lab Streaming Layer library
- SharpDX library
- Clone or download the repository containing the application code.
- Install the required dependencies using NuGet or your preferred package manager.
- Launch the application.
- Connect your device (e.g., Adapted Balance Board or Rotary ForceFeed).
- Select the device from the drop-down menu.
- Click the "Link" button to start data streaming.
The application uses SharpDX.DirectInput to detect compatible devices:
- Adapted Balance Board: Identified under
DeviceType.JoystickorDeviceType.Supplemental. - Rotary ForceFeed: Identified based on product name containing "Micro".
The application initializes an LSL stream with metadata describing the device and data channels. Sample data is collected from the device and streamed to external software.
To correctly read XDF data in MATLAB, use the following:
load_xdf('your_data.xdf');
plot(double(bitshift(uint32(data'), -8)) / 2.7); % Convert to kg (approx.)- Streams 5 channels: bottom-left, top-left, top-right, bottom-right weights (in kilograms), and a sawtooth calibration signal.
- Streams 2 channels: rotary position and sawtooth calibration signal.
The LSL stream metadata includes:
- Device author and manufacturer information.
- Channel labels, types, and units.
- Ensure device drivers are installed for successful detection.
- The application relies on buffered data acquisition for accurate sampling.
- Device Not Found: Ensure the device is connected and recognized by the system.
- Link Button Disabled: Indicates no compatible device was detected.
Pull requests and contributions are welcome. Please follow the coding standards and include documentation for new features.
M.M. Span
University of Groningen
markspan.github.io