All Projects → charliegerard → Epoc.js

charliegerard / Epoc.js

Licence: mit
Node.js addon for the Emotiv C++ SDK

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Epoc.js

Lua Rtos Esp32
Lua RTOS for ESP32
Stars: ✭ 621 (-18.61%)
Mutual labels:  iot
Smartir
Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
Stars: ✭ 677 (-11.27%)
Mutual labels:  iot
Contiki Ng
Contiki-NG: The OS for Next Generation IoT Devices
Stars: ✭ 710 (-6.95%)
Mutual labels:  iot
Assistant Relay
A Node.js server that allows for sending commands to Google Home/Assistant from endpoints
Stars: ✭ 638 (-16.38%)
Mutual labels:  iot
Platformio Vscode Ide
PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
Stars: ✭ 676 (-11.4%)
Mutual labels:  iot
Shellhub
💻 ShellHub enables teams to easily access any Linux device behind firewall and NAT.
Stars: ✭ 686 (-10.09%)
Mutual labels:  iot
Attifyos
Attify OS - Distro for pentesting IoT devices
Stars: ✭ 615 (-19.4%)
Mutual labels:  iot
Dot Dom
.dom is a tiny (512 byte) template engine that uses virtual DOM and some of react principles
Stars: ✭ 757 (-0.79%)
Mutual labels:  iot
Mcw
Microsoft Cloud Workshop Project
Stars: ✭ 677 (-11.27%)
Mutual labels:  iot
Swupdate
Software Update for Embedded Systems
Stars: ✭ 711 (-6.82%)
Mutual labels:  iot
Inchat
一个轻量级、高效率的支持多端(应用与硬件Iot)的可分布式、异步网络应用通讯框架
Stars: ✭ 654 (-14.29%)
Mutual labels:  iot
Open Balena
Open source software to manage connected IoT devices
Stars: ✭ 664 (-12.98%)
Mutual labels:  iot
Amazon Dash
Hack your Amazon Dash to run what you want.
Stars: ✭ 703 (-7.86%)
Mutual labels:  iot
Upm
UPM is a high level repository that provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform through calls to MRAA APIs.
Stars: ✭ 622 (-18.48%)
Mutual labels:  iot
Pigpio
Fast GPIO, PWM, servo control, state change notification and interrupt handling with Node.js on the Raspberry Pi
Stars: ✭ 747 (-2.1%)
Mutual labels:  iot
Singularity
A DNS rebinding attack framework.
Stars: ✭ 621 (-18.61%)
Mutual labels:  iot
Arduino Mqtt
MQTT library for Arduino
Stars: ✭ 685 (-10.22%)
Mutual labels:  iot
Zmninja
High performance, cross platform ionic app for Home/Commerical Security Surveillance using ZoneMinder
Stars: ✭ 762 (-0.13%)
Mutual labels:  iot
Raylib
A simple and easy-to-use library to enjoy videogames programming
Stars: ✭ 8,169 (+970.64%)
Mutual labels:  iot
Paper collection
Academic papers related to fuzzing, binary analysis, and exploit dev, which I want to read or have already read
Stars: ✭ 710 (-6.95%)
Mutual labels:  iot

JavaScript framework for the Emotiv EPOC [WIP]

This framework provides an interface to access data from the Emotiv EPOC brain sensor using Node.js.

To use this framework, you're gonna need an EPOC / EPOC+ or Insight that you can buy here.

Originally based on the epocutils library by @StephaneAG

Demo:

mind controlled interface

Status:

  • Refactored to use latest SDK (v3.5.0).

  • Cognitive actions should now be working.

How to Install

  • Download the Emotiv Community SDK v3.4.0 here and copy the edk.framework file (community-sdk > lib > Mac > edk.framework) to /Library/Frameworks (on Mac).

  • Either clone this repo and run

  npm install

or just run:

  npm install epocjs

How to Use

When writing a program, use either the connectToEmoComposer or connectToLiveData function to use the emulator or the data coming from the device.

Example of simple program:

  var Epoc = require('epocjs')();

  Epoc.connectToLiveData("<path to your profile file>", function(event){
    if(event.smile > 0){
      console.log('smiling')
    }
  })

or:

  var Epoc = require('epocjs')();

  Epoc.connectToEmoComposer(function(event){
    if(event.smile > 0){
      console.log('smiling')
    }
  })

The path to your user file should be something like this /Users/< username >/Library/Application Support/Emotiv/Profiles/< filename >.emu

Device data


Getting the battery level - only working when connecting to the device, not the EmoComposer. This event should happen everytime the battery level changes.

  if(event.batteryLevel > 0){
    //do something
  }

Events


Smile

If the value is superior to 0, the headset is detecting that the user is smiling.

  if(event.smile > 0){
    // do something
  }

Looking Up / Down / Left / Right

The headset can detect the direction in which the user is looking:

  if(event.lookingUp > 0){
    // do something
  }

  if(event.lookingDown > 0){
    // do something
  }

  if(event.lookingLeft > 0){
    // do something
  }

  if(event.lookingRight > 0){
    // do something
  }

Blink

Detect if the user blinked:

  if(event.blink > 0){
    // do something
  }

Winking Left / Right

The headset can detect if the user is winking:

  if(event.winkingLeft > 0){
    // do something
  }

  if(event.winkingRight > 0){
    // do something
  }

Laugh

Detect if the user is laughing:

  if(event.laugh > 0){
    // do something
  }

Gyroscope

Detect changes in gyroscope data:

  if(event.gyroX){
    // do something
  }

  if(event.gyroX){
    // do something
  }

Cognitive Actions

Actions available:

  • push
  • pull
  • lift
  • drop
  • left
  • right
  • rotate left
  • rotate right
  • rotate clockwise
  • rotate counter clockwise
  • rotate reverse
  • disappear
  switch(cognitivAction){
    case 2:
      console.log('push')
      break;
    case 4:
      console.log('pull')
      break;
    case 8:
      console.log('lift')
      break;
    case 16:
      console.log('drop')
      break;
    case 32:
      console.log('left')
      break;
    case 64:
      console.log('right')
      break;
    case 128:
      console.log('rotate left')
      break;
    case 256:
      console.log('rotate right')
      break;
    case 512:
      console.log('rotate clockwise')
      break;
    case 1024:
      console.log('rotate counter clockwise')
      break;
    case 2048:
      console.log('rotate forwards')
      break;
    case 4096:
      console.log('rotate reverse')
      break;
    case 8192:
      console.log('disappear')
      break;
  }

Special Thanks

Thanks to Cam Swords for his help :)

License

Licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].