1.0.2 • Published 5 years ago

mind-controlled-x v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Mind Controlled X

Your new mind controlled X projects start point.

Installation

npm install mind-controlled-x # or # yarn add mind-controlled-x

Usage

index.js

// First usage. (Needs internet connection.)
const mind = require('mind-controlled-x')({
  license: 'free',
  clientId: 'xxxxxxxxxxxx',
  clientSecret: 'xxxxxxxxx',
  debit: 1,
}) // Copy auth token and headset ID and use below (Does not needs internet connection.)
// --------------- OR ---------------
const mind = require('mind-controlled-x')({
  headsetId: 'EPOCPLUS-xxxxxxxx',
  authToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
})

const streams = ['com', 'mot', 'fac'] // https://emotiv.github.io/cortex-docs/#subscriptions

mind.sub(streams, async event => {
  const data = JSON.parse(event)
  console.log(data)
})