3.1.3 • Published 5 months ago

bci2k v3.1.3

Weekly downloads
6
License
ISC
Repository
github
Last release
5 months ago

bci2k.js

A javascript connector for BCI2000

badge badge MIT license

bci2k.js relies on a binary server called BCI2000Web, which allows browsers to communicate with Operator using the Operator Scripting language and stream data in to the browser using websockets.

Install

npm install --save bci2k

Usage

Connect to BCI2000

import { BCI2K_OperatorConnection } from "./dist/index.js";

const bciOperator = new BCI2K_OperatorConnection();

(async () => {
    try{
        await bciOperator.connect("ws://127.0.0.1")
        console.log("Connected"))
    } catch(err){
        console.log(err)
    }
})()

Execute system commands

bciOperator.showWindow();
bciOperator.hideWindow();
bciOperator.resetSystem();
bciOperator.start();
bciOperator.getVersion();
bciOperator.execute("args"); //args are any BCI2000 Operator commands

Tap data from part of the signal processing chain

import { BCI2K_DataConnection } from "./dist/index.js";

async () => {
    let bciSourceConnection = new BCI2K_DataConnection();
    try{
        await bciSourceConnection.connect("ws://localhost:20100")
        bciSourceConnection.onStateFormat = data => console.log(data);
        bciSourceConnection.onSignalProperties = data => console.log(data);
        bciSourceConnection.onGenericSignal = data => console.log(data);}
    }
    catch(err){
        console.log(err);
    }

Development

npm run build
npm run dev

License

MIT

3.1.3

5 months ago

3.1.2

5 months ago

3.1.1

5 months ago

3.1.0

5 months ago

3.0.4

1 year ago

3.0.5

1 year ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

3.0.0-alpha.1

3 years ago

3.0.0-alpha.0

3 years ago

3.0.0-alpha.3

3 years ago

2.3.4

3 years ago

3.0.0-alpha.2

3 years ago

2.3.5

3 years ago

2.3.3

3 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.4

4 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.9

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.8

6 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago