Community /

New JavaScript open-source projects for OpenBCI

code_europe2

Ganglion BLE

With the new Web Bluetooth API landing in Google Chrome, It is now possible to get a data stream from the Ganglion board directly to the web browser.

Screen Shot 2017-12-11 at 10.08.52 PM

After calling the the init function from user interaction (e.g. button click), the browser will display Ganglion as part of the device list.

ganglion

After pairing the device, the browser will show the Web Bluetooth indicator on the right side of the tab, and the data from the Ganglion will be logged in the browser console.

ganglion-2

Check out on GitHub

OpenBCI Observable

In an effort to add reactive programming capabilities to the OpenBCI Node SDKs, we’ve created a layer of abstraction that features the same API for working with the Cyton, Ganglion and, WiFi shield in Node.

Screen Shot 2017-12-11 at 10.10.04 PM

The usage for these set of classes is exactly the same as the browser API. This means it is possible to migrate the code from server to client and vice versa, painlessly.

Working with RxJS has allowed us to easily control the data flow, buffer over a period of time and, apply data transformations in a reactive, performant, and immutable fashion.

Check out on GitHub

EEG Pipes

When working with EEG, we usually do the same data processing over and over again. That’s why we’ve create EEG Pipes. This project features a set of RxJS operators that allow to easily do transforms to data streams from all projects mentioned above.

Screen Shot 2017-12-11 at 10.10.17 PM

The code sample above will output an FFT buffer of alpha waves.

Other operators include filtering channels, low pass and notch filters, buffering, and more.

Check out on GitHub

For a demo on the use of these packages for visualizing a time series with Angular, visit the angular-openbci-rx project.

We aim to grow and advance the JavaScript ecosystem for working with OpenBCI. We invite you to join the conversation on GitHub for any of the projects.

Special thanks to AJ Keller from Push The World for his help and guidance.

Alex Castillo

Leave a Reply