Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.
/ ganglion-ble Public archive

Web Bluetooth client for the Ganglion brain-computer interface by OpenBCI

Notifications You must be signed in to change notification settings

neurosity/ganglion-ble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Web Bluetooth client for the Ganglion brain-computer interface by OpenBCI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published