OpenBCI_NodeJS_Ganglion: cannot get accelData from sample (undefined)
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):

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

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!
Below is the code I'm using(image):

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

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
Below are the images of my code and output:
Should I put the accelerometer enable command somewhere else?
Thanks for the reply!