Skip to content

Commit 41eed2e

Browse files
author
AJ Keller
committed
ADD: Support for Ganglion full parse support
1 parent 0f87f06 commit 41eed2e

8 files changed

+497
-31
lines changed

Diff for: changelog.md renamed to CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
### New Functions
103103

104-
* Add function `getFirmware(dataBuffer)` to utilities
104+
* Add function `getFirmware(dataBuffer)` to utilities
105105

106106
### Breaking Changes
107107

@@ -139,7 +139,7 @@
139139
### New Features
140140

141141
* In openBCIUtilities.js add function `transformRawDataPacketToSample` to parse a single raw data packet
142-
* In openBCIConstants.js add function `rawDataToSampleObjectDefault(numChannels)` which should be used by drivers to create the object that is passed through each call to `transformRawDataPacketsToSample`
142+
* In openBCIConstants.js add function `rawDataToSampleObjectDefault(numChannels)` which should be used by drivers to create the object that is passed through each call to `transformRawDataPacketsToSample`
143143

144144
# v0.0.6
145145

Diff for: CODE_OF_CONDUCT.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# OpenBCI JavaScript Utilities Library Code of Conduct
2+
3+
## Purpose
4+
5+
It is our hope that any one is able to contribute to OpenBCI JavaScript Utilities Library regardless of their background. Thus, we hope to provide a safe, welcoming, and warmly geeky environment for everybody, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment
10+
include:
11+
12+
* Using welcoming and inclusive language
13+
* Being respectful of differing viewpoints and experiences
14+
* Gracefully accepting constructive criticism
15+
* Focusing on what is best for the community
16+
* Showing empathy towards other community members
17+
18+
Examples of unacceptable behavior by participants include:
19+
20+
* The use of sexualized language or imagery and unwelcome sexual attention or
21+
advances
22+
* Trolling, insulting/derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or electronic
25+
address, without explicit permission
26+
* Other conduct which could reasonably be considered inappropriate in a
27+
professional setting
28+
29+
## Our Responsibilities
30+
31+
Project maintainers are responsible for clarifying the standards of acceptable
32+
behavior and are expected to take appropriate and fair corrective action in
33+
response to any instances of unacceptable behavior.
34+
35+
Project maintainers have the right and responsibility to remove, edit, or
36+
reject comments, commits, code, wiki edits, issues, and other contributions
37+
that are not aligned to this Code of Conduct, or to ban temporarily or
38+
permanently any contributor for other behaviors that they deem inappropriate,
39+
threatening, offensive, or harmful.
40+
41+
## Scope
42+
43+
This Code of Conduct applies both within project spaces and in public spaces
44+
when an individual is representing the project or its community. Examples of
45+
representing a project or community include using an official project e-mail
46+
address, posting via an official social media account, or acting as an appointed
47+
representative at an online or offline event. Representation of a project may be
48+
further defined and clarified by project maintainers.
49+
50+
## Enforcement
51+
52+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
53+
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
54+
complaints will be reviewed and investigated and will result in a response that
55+
is deemed necessary and appropriate to the circumstances. The project team is
56+
obligated to maintain confidentiality with regard to the reporter of an incident.
57+
Further details of specific enforcement policies may be posted separately.
58+
59+
Project maintainers who do not follow or enforce the Code of Conduct in good
60+
faith may face temporary or permanent repercussions as determined by other
61+
members of the project's leadership.
62+
63+
## Attribution
64+
65+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
66+
available at [http://contributor-covenant.org/version/1/4][version]
67+
68+
[homepage]: http://contributor-covenant.org
69+
[version]: http://contributor-covenant.org/version/1/4/

Diff for: CONTRIBUTING.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
:tada::clinking_glasses: First off, thanks for taking the time to contribute! :tada::clinking_glasses:
4+
5+
Contributions are always welcome, no matter how small.
6+
7+
The following is a small set of guidelines for how to contribute to the project
8+
9+
## Where to start
10+
11+
### Code of Conduct
12+
This project adheres to the Contributor Covenant [Code of Conduct](CODE_OF_CONDUCT.md).
13+
By participating you are expected to adhere to these expectations. Please report unacceptable behaviour to [[email protected]](mailto:[email protected])
14+
15+
### Contributing on Github
16+
17+
If you're new to Git and want to learn how to fork this repo, make your own additions, and include those additions in the master version of this project, check out this [great tutorial](http://blog.davidecoppola.com/2016/11/howto-contribute-to-open-source-project-on-github/).
18+
19+
### Community
20+
21+
This project is maintained by the [OpenBCI](www.openbci.com) and [NeuroTechX](www.neurotechx.com) community. Join the NeuroTechX Slack to check out our #devices channel, where discussions about OpenBCI takes place.
22+
23+
## How can I contribute?
24+
25+
This is currently a small, humble project so our contribution process is rather casual. Take a look at our [GitHub Projects board to see](https://github.com/NeuroTechX/eeg-101/projects) to see all the features we are currently working on. If there's a feature you'd be interested in building, go ahead! Let us know on the #interactive-tutorial channel on [the NeuroTechX Slack](http://neurotechx.herokuapp.com/) and we'll support you as much as we can. When you're finished submit a pull request to the master branch referencing the specific issue you addressed.
26+
27+
If you find a bug, or have a suggestion on how to improve the project, just fill out a [Github issue](../../issues)

Diff for: README.md

+149-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,149 @@
1+
# OpenBCI JavaScript Utilities Library
2+
3+
<p align="center">
4+
<img alt="banner" src="/images/node_icon2.png/" width="300">
5+
</p>
6+
<p align="center" href="">
7+
Provide a stable javascript library for OpenBCI
8+
</p>
9+
110
[![Build Status](https://travis-ci.org/OpenBCI/OpenBCI_NodeJS_Utilities.svg?branch=master)](https://travis-ci.org/OpenBCI/OpenBCI_NodeJS_Utilities)
211
[![codecov](https://codecov.io/gh/OpenBCI/OpenBCI_NodeJS_Utilities/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenBCI/OpenBCI_NodeJS_Utilities)
312
[![Dependency Status](https://david-dm.org/OpenBCI/OpenBCI_NodeJS_Utilities.svg)](https://david-dm.org/OpenBCI/OpenBCI_NodeJS_Utilities)
413
[![npm](https://img.shields.io/npm/dm/openbci-ganglion.svg?maxAge=2592000)](http://npmjs.com/package/openbci-utilities)
514
[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square)](https://github.com/Flet/semistandard)
615

7-
# OpenBCI Node.js Utilities
16+
## Welcome!
17+
18+
First and foremost, Welcome! :tada: Willkommen! :confetti_ball: Bienvenue! :balloon::balloon::balloon:
19+
20+
Thank you for visiting the OpenBCI JavaScript Utilities Library repository.
21+
22+
This document (the README file) is a hub to give you some information about the project. Jump straight to one of the sections below, or just scroll down to find out more.
23+
24+
* [What are we doing? (And why?)](#what-are-we-doing)
25+
* [Who are we?](#who-are-we)
26+
* [What do we need?](#what-do-we-need)
27+
* [How can you get involved?](#get-involved)
28+
* [Get in touch](#contact-us)
29+
* [Find out more](#find-out-more)
30+
* [Understand the jargon](#glossary)
31+
32+
## What are we doing?
33+
34+
### The problem
35+
36+
* The first javascript libraries for OpenBCI was the [NodeJS Cyton SDK][link_nodejs], then the [NodeJS Ganglion SDK][link_nodejs_ganglion], then the [NodeJS for WiFi][link_nodejs_wifi], each with their own interfaces, serial, bluetooth, and wifi respectively.
37+
* The ganglion's raw data is incredibly complex and must be decompressed and carefully parsed, in less words, it takes time to learn to parse this stream
38+
* People want to use the [Ganglion][link_shop_ganglion] in the web browser
39+
40+
So, if even developers are interested in working with [OpenBCI][link_shop_openbci] devices with javascript, they have a huge burden to overcome before they can parse the data.
41+
42+
### The solution
43+
44+
The OpenBCI JavaScript Utilities Library will:
45+
46+
* Provide a nice cozy home to all the horror of parsing raw binary byte streams
47+
* Use automated testing extensively and don't let untested code be released!
48+
* Work in the browser and NodeJS!
49+
* Be able to parse ganglion and cyton data.
50+
* Store a constants file so every module agrees on names of keys and such
51+
52+
Using a single unified JavaScript library solves the challenges of parsing raw brainwave data. Our main goal is to ***provide a stable javascript library for OpenBCI***
53+
54+
## Who are we?
55+
56+
The main code writer of the OpenBCI JavaScript Utilities Library is [AJ Keller][link_aj_keller]. This code all started in the OpenBCI NodeJS SDK for Cyton. Many people contributed, if not directly, but by advice or instructions drawn on a coffee table to calculate impedance. A lot of people who use this library never have any idea about it! Every user of the OpenBCI GUI is heavily dependent on this code base for all data acquisition from the Cyton, Ganglion and WiFi shield!
57+
58+
## What do we need?
59+
60+
**You**! In whatever way you can help.
61+
62+
We need expertise in programming, user experience, software sustainability, documentation and technical writing and project management.
63+
64+
We'd love your feedback along the way.
65+
66+
Our primary goal is to provide a stable javascript library for OpenBCI, and we're excited to support the professional development of any and all of our contributors. If you're looking to learn to code, try out working collaboratively, or translate you skills to the digital domain, we're here to help.
67+
68+
## Get involved
69+
70+
If you think you can help in any of the areas listed above (and we bet you can) or in any of the many areas that we haven't yet thought of (and here we're *sure* you can) then please check out our [contributors' guidelines](CONTRIBUTING.md) and our [roadmap](ROADMAP.md).
71+
72+
Please note that it's very important to us that we maintain a positive and supportive environment for everyone who wants to participate. When you join us we ask that you follow our [code of conduct](CODE_OF_CONDUCT.md) in all interactions both on and offline.
873

9-
A Node.js module for OpenBCI ~ written with love by [Push The World!](http://www.pushtheworldllc.com)
74+
## Contact us
1075

11-
Push The World is actively developing and maintaining this module.
76+
If you want to report a problem or suggest an enhancement we'd love for you to [open an issue](../../issues) at this github repository because then we can get right on it. But you can also contact [AJ][link_aj_keller] by email (pushtheworldllc AT gmail DOT com) or on [twitter](https://twitter.com/aj-ptw).
1277

13-
The purpose of this module is to supply a common node core that allows the reuse of mission critical components, such as sending commands or using a simulator.
78+
## Find out more
79+
80+
You might be interested in:
81+
82+
* What is [OpenBCI][link_openbci]?
83+
84+
And of course, you'll want to know our:
85+
86+
* [Contributors' guidelines](CONTRIBUTING.md)
87+
* [Roadmap](ROADMAP.md)
88+
89+
## Thank you
90+
91+
Thank you so much (Danke schön! Merci beaucoup!) for visiting the project and we do hope that you'll join us on this amazing journey to make programming with OpenBCI fun and easy.
92+
93+
# Documentation
1494

1595
### Table of Contents:
1696
---
1797

18-
1. [Developing](#developing)
19-
2. [Testing](#developing-testing)
20-
3. [Contribute](#contribute)
21-
4. [License](#license)
98+
1. [Installation](#install)
99+
2. [Usage](#usage)
100+
2. [Developing](#developing)
101+
3. [Testing](#developing-testing)
102+
4. [Contribute](#contribute)
103+
5. [License](#license)
104+
105+
## <a name="install"></a> Installation:
106+
107+
```
108+
npm install openbci-utilities
109+
```
110+
111+
## <a name="usage"></a> Usage:
112+
113+
### In NodeJS
114+
115+
```node
116+
const { constants, debug, utilities } = require('openbci-utilities');
117+
118+
console.log('OpenBCIUtilities', OpenBCIUtilities);
119+
```
120+
121+
### In Web Browser
122+
123+
**index.html**
124+
125+
```html
126+
<!doctype html>
127+
<html>
128+
<head>
129+
<meta charset="UTF-8">
130+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
131+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
132+
<title>OpenBCI Utilities</title>
133+
</head>
134+
<body>
135+
<pre>See data in the console</pre>
136+
<script src="../../dist/openbci-utilities.var.js"></script>
137+
<script src="./index.js"></script>
138+
</body>
139+
</html>
140+
```
141+
142+
**index.js**
143+
144+
```javascript
145+
console.log(OpenBCIUtilities);
146+
```
22147

23148

24149
## <a name="developing"></a> Developing:
@@ -49,3 +174,19 @@ npm test
49174
## <a name="license"></a> License:
50175

51176
MIT
177+
178+
[link_aj_keller]: https://github.com/aj-ptw
179+
[link_shop_wifi_shield]: https://shop.openbci.com/collections/frontpage/products/wifi-shield?variant=44534009550
180+
[link_shop_ganglion]: https://shop.openbci.com/collections/frontpage/products/pre-order-ganglion-board
181+
[link_shop_cyton]: https://shop.openbci.com/collections/frontpage/products/cyton-biosensing-board-8-channel
182+
[link_shop_cyton_daisy]: https://shop.openbci.com/collections/frontpage/products/cyton-daisy-biosensing-boards-16-channel
183+
[link_nodejs]: https://github.com/OpenBCI/OpenBCI_NodeJS
184+
[link_nodejs_cyton]: https://github.com/OpenBCI/OpenBCI_NodeJS_Cyton
185+
[link_nodejs_ganglion]: https://github.com/OpenBCI/OpenBCI_NodeJS_Ganglion
186+
[link_nodejs_wifi]: https://github.com/OpenBCI/OpenBCI_NodeJS_Wifi
187+
[link_ptw]: https://www.pushtheworldllc.com
188+
[link_openbci]: http://www.openbci.com
189+
[link_mozwow]: http://mozillascience.github.io/working-open-workshop/index.html
190+
[link_wifi_get_streaming]: examples/getStreaming/getStreaming.js
191+
[link_openleaderscohort]: https://medium.com/@MozOpenLeaders
192+
[link_mozsci]: https://science.mozilla.org

Diff for: ROADMAP.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Roadmap
2+
3+
## OpenBCI JavaScript Utilities Library
4+
5+
Provide a stable javascript library for OpenBCI
6+
7+
## Short term - what we're working on now
8+
9+
- Unit tests!
10+
- Documentation for public functions
11+
12+
## Medium term
13+
14+
- Examples

Diff for: images/node_icon2.png

7.15 KB
Loading

0 commit comments

Comments
 (0)