charliegerard/Epoc.js
FreeNode.js addon for the Emotiv C++ SDK
FreeFree tier
About charliegerard/Epoc.js
Epoc.js is an open-source Node.js addon that provides a JavaScript framework for interfacing with the Emotiv EPOC brain sensor. It allows developers to access real-time brainwave data, detect facial expressions (smile, blink, wink, laugh), eye movements (looking up/down/left/right), gyroscope data, and battery level changes. The framework also supports cognitive actions such as push, pull, lift, drop, left, right, rotate, and more. It can connect to the EmoComposer emulator or a live EPOC/EPOC+/Insight headset via the Emotiv Community SDK. Installation is available via npm and the library is designed for building brain-computer interface applications.
Key Features
Interface for Emotiv EPOC, EPOC+, and Insight brain sensors
Detect facial expressions: smile, blink, wink, laugh
Detect eye movements: looking up, down, left, right
Read gyroscope data for head orientation
Support for cognitive actions: push, pull, lift, drop, left, right, rotate
Battery level monitoring
Connect to EmoComposer emulator or live device
Installable via npm (npm install epocjs)
Pros & Cons
Pros
- Open source and freely available
- Easy to install via npm
- Works with emulator for testing without hardware
- Detects a wide variety of signals (facial, eye, cognitive, gyroscope)
- Based on official Emotiv SDK
Cons
- Requires an Emotiv EPOC/EPOC+/Insight headset and SDK
- Work in progress (WIP) status
- Only tested on macOS (installation instructions for Mac only)
- Limited documentation beyond the README
Best For
Brain-computer interface (BCI) experiments and prototypesControlling applications with facial expressions or thoughtsNeurofeedback and cognitive trainingResearch in human-computer interaction with EEG data
FAQ
How do I install Epoc.js?
Download the Emotiv Community SDK v3.4.0 and copy the edk.framework to /Library/Frameworks (on Mac). Then either clone the repo and run npm install, or run npm install epocjs.
How do I connect to the device?
Use the connectToEmoComposer() function to connect to the emulator, or connectToLiveData() with the path to your Emotiv profile file to use a live headset.
What events can I detect?
Events include smile, blink, wink (left/right), looking up/down/left/right, laugh, gyroscope data, battery level changes, and cognitive actions such as push, pull, lift, drop, left, right, rotate, etc.
How do I detect a cognitive action?
Use the cognitivAction event and switch on the action value. For example, value 2 corresponds to 'push', 4 to 'pull', 8 to 'lift', etc.