Skip to content

Releases: cronelab/bci2k.js

No build pipeline, just tsc

01 Oct 21:37
Compare
Choose a tag to compare
3.0.1

Added declarationMap

2.1.7

05 Sep 13:23
Compare
Choose a tag to compare
fixed webpack/websocket external

2.1.6

05 Sep 12:53
Compare
Choose a tag to compare
fixed webpack/websocket external

2.1.5

01 Sep 14:08
Compare
Choose a tag to compare
fixed webpack/websocket external

2.1.4

27 Aug 20:39
Compare
Choose a tag to compare
two getter methods

2.1.3

27 Aug 20:06
Compare
Choose a tag to compare
stateListen method

2.1.2

27 Aug 12:20
Compare
Choose a tag to compare
new data conn example and entry point

2.1.1

17 Aug 04:05
Compare
Choose a tag to compare

bci2k.js

A javascript connector for BCI2000

NPM Version

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 @cronelab/bci2k

Usage

Connect to BCI2000

const BCI2K = require( 'bci2k' );
const bci = new BCI2K.bciOperator();

bci.connect("127.0.0.1")
    .then(() => console.log("Connected"))
    .catch(err => console.log(err)

Execute system commands

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

Tap data from part of the signal processing chain

const connectToSockets = async () => {
    let sourceConnection = await bci.tap("Source");
    try{
        sourceConnection.onStateFormat = data => console.log(data);
        sourceConnection.onSignalProperties = data => console.log(data);
        sourceConnection.onGenericSignal = data => console.log(data);}
    }
    catch(err){
        console.log(err);
    }

    //or

    let bciDataConnection = new BCI2K.bciData();
    bciDataConnection.connect("127.0.0.1:12345")
    let signal = bciDataConnection.signal;

See more in the examples folder

Development

npm run build
npm run dev

License

MIT

2.1.0

17 Aug 03:50
Compare
Choose a tag to compare

bci2k.js

A javascript connector for BCI2000

NPM Version

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 @cronelab/bci2k

Usage

Connect to BCI2000

const BCI2K = require( 'bci2k' );
const bci = new BCI2K.bciOperator();

bci.connect("127.0.0.1")
    .then(() => console.log("Connected"))
    .catch(err => console.log(err)

Execute system commands

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

Tap data from part of the signal processing chain

const connectToSockets = async () => {
    let sourceConnection = await bci.tap("Source");
    try{
        sourceConnection.onStateFormat = data => console.log(data);
        sourceConnection.onSignalProperties = data => console.log(data);
        sourceConnection.onGenericSignal = data => console.log(data);}
    }
    catch(err){
        console.log(err);
    }

    //or

    let bciDataConnection = new BCI2K.bciData();
    bciDataConnection.connect("127.0.0.1:12345")
    let signal = bciDataConnection.signal;

See more in the examples folder

Development

npm run build
npm run dev

License

MIT

2.0.10

17 Aug 03:04
Compare
Choose a tag to compare

bci2k.js

A javascript connector for BCI2000

NPM Version

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

const BCI2K = require( 'bci2k' );
const bci = new BCI2K.bciOperator();

bci.connect("127.0.0.1")
    .then(() => console.log("Connected"))
    .catch(err => console.log(err)

Execute system commands

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

Tap data from part of the signal processing chain

const connectToSockets = async () => {
    let sourceConnection = await bci.tap("Source");
    try{
        sourceConnection.onStateFormat = data => console.log(data);
        sourceConnection.onSignalProperties = data => console.log(data);
        sourceConnection.onGenericSignal = data => console.log(data);}
    }
    catch(err){ 
        console.log(err);
    }

    //or

    let bciDataConnection = new BCI2K.bciData();
    bciDataConnection.connect("127.0.0.1:12345")
    let signal = bciDataConnection.signal;

See more in the examples folder

Development

npm run build
npm run dev

License

MIT