Electronic – arduino – How to read serial data from the Neurosky chips

arduinoserial

I recently bought a Star Wars Force Trainer II with the intention of using it to read the attention and meditation values.

I looked at the Arduino Brain library but that didn't work.

I started reading the serial data at a 9600 baud rate and got this data (https://pastebin.com/2SH1yarQ). Can anyone help me figure out how to use this data to find the attention and meditation values or how to get the Arduino Brain library to start working?

Best Answer

http://developer.neurosky.com/docs/lib/exe/fetch.php?media=mindset_communications_protocol.pdf

This is fully documented, the 2 0xAA bytes (170) are the sync bytes at the start of a message, the next byte is the payload length, and finally you have the CRC.

The linked pdf even has example code for parsing the data,