Skip to main content

Toolbox to receive godirect data and send as LSL streams.

Project description

Verniersl

This is a command-line-interface to collect data from a Godirect device and stream it via labstreaming layer.

The app is written in python 3.

Installation

pip install vernier-lsl

You can install the development version with

git clone https://github.com/labstreaminglayer/app-vernier
cd app-vernier
pip install -e .
pip install -r requirements.txt

The app wraps pylsl and godirect from Vernier (https://github.com/VernierST/godirect-py). The latter wraps hidapi for USB and vernierpygatt for BLE. On linux, compilation of the wheels for hidapi required libusb and libudev.

Usage

usage: vernier-lsl [-h] [--scan] [--enable ENABLE]
                 [--serial_number SERIAL_NUMBER] [--order_code ORDER_CODE]
                 [--number NUMBER] [--mode MODE]

Stream Vernier Go-Direct with LSL

optional arguments:
  -h, --help            show this help message and exit
  --scan                report the available devices
  --enable ENABLE       which channels do enable: List
  --serial_number SERIAL_NUMBER
                        The serial number (eg. OK2001B3) of the desired
                        device. Streams are then limited to a single device
  --order_code ORDER_CODE
                        The order code (eg. GDX-ACC for an accelerometer) of
                        the desired device. Can find and stream more than one
                        device
  --number NUMBER       How many devices are expected, aborts otherwise.
                        Helpful as sometimes, one connection might be lost,
                        and we would start streaming then anyways. Defaults to
                        1
  --mode MODE           Whether the devices are to be searched and connected
                        over "usb", "ble" or "any". Defaults to "usb"

Example

The terminology of Go Direct device can be confusing, as the device itself can be called a sensor, while each device has a set of individual sensors which can be turned on or off. Some of them are turned on by default. Check which devices are available, and show their available sensors, and which of there are enabled by default:

vernier-lsl --scan

Find a Go Direct (C) Acceleration Sensor, enable the default sensors and stream it

vernier-lsl --order_code GDX-ACC

Find a specific Go Direct (C) Acceleration Sensor, enable the x,y, andz axis acceleration sensors and stream it

vernier-lsl --enable "[X-axis acceleration, Y-axis acceleration, Z-axis acceleration]" --order_code GDX-ACC --serial_number 0H101754

Find exactly two Hand Dynamometers, enable force sensors and stream them.

vernier-lsl --enable Force --order_code GDX-HD --number 2

Supported devices

The toolbox was developed and tested on the USB interface for the GDX-HD Hand Dynamometer, the GDX-ACC accelerometer, and the GDX-RB Respiration Belt. Vernier has a large variety of sensor devices (https://www.vernier.com/products/sensors/go-direct-sensors/). Some have quirks, e.g. for the GDX-ACC the sensors channel indices were set up wrong. So, pop a note if another device works (or doesn't)!

Bluetooth

I have also implemented BLE support, but this requires a Bluegiga BLED112 Bluetooth® Low Energy Dongle, see also: https://github.com/VernierST/godirect-py/issues/5 Please note that in the meantime, starting with godirect-py v1.0.5, godirect has implememted the bleak backend. I have not tested this.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vernier-lsl-0.2.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

vernier_lsl-0.2.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file vernier-lsl-0.2.1.tar.gz.

File metadata

  • Download URL: vernier-lsl-0.2.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.7.6

File hashes

Hashes for vernier-lsl-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ee69bebe8ec67be7126a1b14b08be5906416e6100e1ab9302f96bf04d1d44b23
MD5 822c59cb67bf31ddd4986a7e744fb7ca
BLAKE2b-256 a62034eb331b403e4ea990915434732a2a0a15cb1003de4c1896a12b8ea9bbbe

See more details on using hashes here.

File details

Details for the file vernier_lsl-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: vernier_lsl-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.7.6

File hashes

Hashes for vernier_lsl-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 817fa8b88116da2e22d787b33af831a8854269cba5edaede9b0581588ac4dccc
MD5 6a1044d395c795a0cf214d6fa81882fc
BLAKE2b-256 0d0ea71e6d6793fe7f6c10f9f9549d66e17d4da3d7ac998bf17291d5c411b504

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page