Skip to main content

BITalino-lsl

A python module called bitalino_lsl to stream BITalino data though the Lab Streaming Layer (LSL). This module gets data from the BITalino device through the bitalino python api and uses the Lab Stream Layer to stream the data.

The module should work with python versions >= 2.7 although it has only been tested for:

  • Python 2.7.15
  • Python 3.6.5

Getting started

Installation

pip install bitalino_lsl

Example

import bitalino_lsl
from pylsl import StreamInlet, resolve_stream
import time

# MAC address of the BITalino device
MAC_ADDRESS_BITALINO_DEVICE = "20:17:11:1A:2B:3C"

# List with channels of the BITalino device to be streamed to the LSL
# This channels can be specified as a list or as a dictionary with their
# position in the 10-20 system. BITalino uses bipolar electrodes so the
# position will be defined by two points
# CHANNELS = {0: 'Fp1-Fp2', 1: 'P3-T5'}
CHANNELS = [0,1]

# Connect with the BITalino device
device = bitalino_lsl.BitalinoLSL(MAC_ADDRESS_BITALINO_DEVICE)

# Create the Stream with the channels information
device.create_lsl_EEG(CHANNELS)

# Start the stream getting data from the BITalino device
device.start()

# Get the Stream to read the data from
inlet = StreamInlet(resolve_stream('type', 'EEG')[0])

# Read the BITalino data for 5 seconds
t_end = time.time() + 5
while time.time() < t_end:
  sample, timestamp = inlet.pull_sample()
  print(sample)

# Stop the device
device.stop()

# Close the connection with the BITalino device
device.close()

Documentation

Documentation is available here

License

This project is licensed under the GNU GPL v3

Metadata

Release files for bitalino-lsl 0.0.3

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

Source distribution (sdist)

Source distribution for bitalino-lsl 0.0.3
File Size Uploaded
bitalino_lsl-0.0.3.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bitalino-lsl 0.0.3
File Interpreter ABI Platform
bitalino_lsl-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / bitalino_lsl-0.0.3.tar.gz

Download URL bitalino_lsl-0.0.3.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0d5d781cbef6b051ffc20eb559a793483d742cc3ccf6ba07d8edd579ed036bae
BLAKE2b-256 checksum
How to use checksums
95a66b42530a9880cf6c13579c13aabfc4bbccf6bf136abd7abf8c0ac0c69c5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Release files / bitalino_lsl-0.0.3-py3-none-any.whl

Download URL bitalino_lsl-0.0.3-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3cf484b180ba8b8d777445b599deec0ff520f38e4afcc01de9b16f9bf64a7936
BLAKE2b-256 checksum
How to use checksums
84d5d96b7bc1ebbf039398e033053c7140c4345702ce89225bdacd7d02c16744
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

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