OpenBCI_NodeJS_Ganglion: cannot get accelData from sample (undefined)

NikoKoroNikoKoro Athens, Greece
edited March 2017 in Ganglion
Hello! I'm using the Node.js library for the ganglion board but when I receive the data from the board, the sample.accelData value is undefined.
Below is the code I'm using(image):

image

And here is the output that I get(image again):

image

As far as I know, the accelerometer is enabled by default, but I tried to enable it again (with .accelStart() ) and nothing changed.
Also, when I use the .on('accelerometer') function, the code inside is never executed.

I'm pretty sure I'm doing something wrong, but can't figure out what so far.
Thanks in advance!

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Mentioning AJ @pushtheworld
  • biomurphbiomurph Brooklyn, NY
    The accelerometer is not enabled by default. You need to send the Ganglion the accelerometer enable command.
  • NikoKoroNikoKoro Athens, Greece
    edited March 2017
    Hello! I was trying to use the .accelStart() command, but I just get a "pending" promise. Also, the documentation for the NodeJS library mentions that the accelerometer is enabled by default.

    Below are the images of my code and output:

    image


    image



    Should I put the accelerometer enable command somewhere else?
    Thanks for the reply!
  • @NikoKoro this sounds super frustrating! 

    Sorry this is happening to you, I wonder if this is related to open issue 27 https://github.com/OpenBCI/OpenBCI_NodeJS_Ganglion/issues/27

    Could you please copy and paste your code over onto that GitHub issue?

    I am digging into this right now!
  • NikoKoroNikoKoro Athens, Greece
    Sure I'll do it right away. Thanks! 
Sign In or Register to comment.