Skip to main content

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.

Metadata

Release files for vernier-lsl 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vernier-lsl 0.2.1
File Size Uploaded
vernier-lsl-0.2.1.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vernier-lsl 0.2.1
File Interpreter ABI Platform
vernier_lsl-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / vernier-lsl-0.2.1.tar.gz

Download URL vernier-lsl-0.2.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ee69bebe8ec67be7126a1b14b08be5906416e6100e1ab9302f96bf04d1d44b23
BLAKE2b-256 checksum
How to use checksums
a62034eb331b403e4ea990915434732a2a0a15cb1003de4c1896a12b8ea9bbbe
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / vernier_lsl-0.2.1-py3-none-any.whl

Download URL vernier_lsl-0.2.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
817fa8b88116da2e22d787b33af831a8854269cba5edaede9b0581588ac4dccc
BLAKE2b-256 checksum
How to use checksums
0d0ea71e6d6793fe7f6c10f9f9549d66e17d4da3d7ac998bf17291d5c411b504
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page