1.0.0 • Published 6 years ago

ganglion-ble v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

OpenBCI Ganglion

WebBluetooth client for the Ganglion EEG board by OpenBCI

Installation

npm install --save ganglion-ble

Usage

import Ganglion from 'ganglion-ble';

async function init () {
  const ganglion = new Ganglion();
  await ganglion.connect();
  await ganglion.start();

  ganglion.stream.subscribe(sample => {
      console.log('sample', sample);
  });
}

init();

A sample follows this data structure:

{
  data: [Number, Number, Number, Number],
  timestamp: Date
};

For security reasons, Web Bluetooth must be started from user interaction. Add a connect button that would start the BLE connection. See ./examples/basic/index.js

Accelerometer data example

ganglion.accelData.subscribe(sample => {
    console.log('sample with accelData', sample);
});

Demo

License

MIT

1.0.0

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago