Modern Python 3.7+ library for interfacing with the OpenBCI Ganglion biosensing board over BTLE.
Project description
ganglion-biosensing
Modern Python 3.7+ library for interfacing with the OpenBCI Ganglion biosensing board over BTLE.
The origins of this library come from my personal disagreement with some of the design and implementation choices made by the developers of the official pyOpenBCI library. Some of the code in this repository has been obtained and/or adapted from the official pyOpenBCI code (following the MIT License).
It should be noted that this library does not aim to be a full replacement for the official library, as it is completely focused on the Ganglion board and not on the Cyton. It should rather be looked at as an alternative which aims to target a more modern and efficient implementation from the ground up.
Installation
Simply do:
pip install ganglion-biosensing
Alternatively, install from the Github repository:
pip install git+https://github.com/molguin92/ganglion-biosensing.git
Usage
Usage is pretty straightforward - simply declare a Ganglion within a with-block for automatic connection and cleanup:
from ganglion_biosensing.board.ganglion import GanglionBoard
if __name__ == '__main__':
with GanglionBoard(mac='FF:FF:FF:FF:FF:FF') as board:
board.start_streaming()
for i in range(500):
print(board.samples.get(block=True))
The code is thread safe by design - samples are collected in an asynchronous manner and deposited in the board.samples
queue.
For more details see the examples/
directory and the code itself.
License
Copyright 2019 - Manuel Olguín Muñoz.
Licensed under an MIT license, see LICENSE for details.
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
Built Distribution
Hashes for ganglion-biosensing-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 629a00b959c6c4b226afbbd2a62c950b4de80e3c7a7ca5b7ff39d10b0cdf325b |
|
MD5 | e182c5f144843f13376b1b67c5b3bfb6 |
|
BLAKE2b-256 | dbbc2558c20dc9dda5cfb0c2866d7914d1904c152f3264ab23234fe22612e10c |
Hashes for ganglion_biosensing-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2f41e27b86b27bc1282ce82d51c3ea19ac2dc14d2decfe487aaadb13a454cf5 |
|
MD5 | a8ca9c69f0bf22ac9531c378710a1628 |
|
BLAKE2b-256 | 7fd7939caf5ace1dc50d156a361c20b643026c41c9a3356a3c01c13ee7042550 |