Dear Arduino Gods,
I am trying to use the NeuroSky Mobile for a project. This project will require me to send data from the NeuroSky to the Arduino via Bluetooth serial communication.
I have successfully checked that the Arduino and the BlueSMiRF are hooked up properly by sending data through terminal window Arduino to Cool Term when it is connected to the SMiRF and vice versa.
The next step is to pass data from the Neurosky to the Arduino and to see it in my serial monitor so I can make sense of this data... but I am encountering these two error intermittently:
error, checksum
&
error, packet too long 170
After emailing the developer of this code I was suggested to look at power issues, but my Arudino is powered by computer, and I have tried the SMirF in both the 3.3 and 5volt pins and the data/errors do not change. (I should also note that the max operating voltage on the SMiRF is 6v).
Ok, that is the problem. Now here is the code I have been using from GitHub Repo - Brain
// Arduino Brain Library - Brain SoftSerial Test
// Description: Grabs brain data from software serial on pin 2 and sends CSV out over the hardware serial
// More info: https://github.com/kitschpatrol/Arduino-Brain-Library
// Author: Eric Mika, 2014
#include <SoftwareSerial.h>
#include <Brain.h>
// Set up the software serial port on pins 2 (RX) and 3 (TX). We'll only actually hook up pin 10.
SoftwareSerial softSerial(2, 3);
// Set up the brain reader, pass it the software serial object you want to listen on.
Brain brain(softSerial);
void setup() {
// Start the software serial.
softSerial.begin(9600);
// Start the hardware serial.
Serial.begin(9600);
}
void loop() {
// Expect packets about once per second.
// The .readCSV() function returns a string (well, char*) listing the most recent brain data, in the following format:
// "signal strength, attention, meditation, delta, theta, low alpha, high alpha, low beta, high beta, low gamma, high gamma"
if (brain.update()) {
// Serial.println(brain.readSignalQuality());
Serial.println(brain.readErrors());
Serial.println(brain.readCSV());
//delay(50);
}
}
I should also note that the baud rate on my SMiRF is set correctly based on this code.
Does anyone have any other ideas as to why I would be receiving those errors and not getting the correct data from my NeuroSky? Any suggestions or links to Repos/other code resources would be greatly appreciated.