I have an Emotiv Epoc+ v1.1 released back in 2015 and have the latest emotiv MacOS framework installed ( community-sdk-3.5.1-WIN-MAC-ANDROID
).
I am successfully able to turn on the device and use it in the emotiv apps and see feedback.
However there does not appear to be any Profiles
folder in my users Emotive folder:
/Users/peter/Library/Application Support/Emotiv
I assumed, likely incorrectly, that since I did not have that file, perhaps your instructions were stating I should make a file, as there was a comment in the example for "path/to/user/file"
.
Here is a sample code I used to see if I could get things running:
var Epoc = require('epocjs')();
Epoc.connectToLiveData('./test.emu', function(event) {
if (event) {
console.log('Event Fired');
if (event.batteryLevel && event.batteryLevel > 0) {
console.log(`Battery level: ${event.batteryLevel}%`);
}
}
});
Here is the output from that command
If there is something I am supposed to be doing with the Emotiv in the background, it would be helpful to learn this. The docs make it sound like I can just plug on the device, make sure I can access it via the Emotiv software, then fire up some node script to connect to it, and that is not turning out to be the case :(
BTW, for the sake of testing purposes, I also use the Epoc.connectToEmoComposer
method while tinkering with the EmotivXavierComposer
app in the background, and the output from that was only ever Connected to EmoComposer
but none of the tested events seemed to fire off either. Not sure if maybe something else is going on here where the method are not firing for some reason I don't know about.
Here was my test file for that, should this be a related issues:
var Epoc = require('epocjs')();
Epoc.connectToEmoComposer(function(event) {
if (event) {
pastAction = action;
if (event.blink > 0) {
action = 'blink';
}
if (event.lookingLeft > 0) {
action = 'looking left'
}
if (event.lookingUp > 0) {
action = 'looking up'
}
if (event.gyroX) {
console.log("gyroX: ", event.gyroX);
}
if (event.gyroY) {
console.log("gyroY: ", event.gyroY);
}
// at the moment will only handle 1 event at a time. Need to fix that
if (pastAction !== action) {
console.log('action', action)
}
}
});
Any help would be greatly appreciated ๐