errors with "arduino brain library"

Hey all,
Ive gotten the mind flex/arduino hack on the go (How to Hack Toy EEGs | Frontier Nerds)
and have uploaded this code:

// Arduino Brain Library
// Serial out example, grabs the brain data and sends CSV out over the hardware serial.
// Eric Mika, 2010

#include <Brain.h>

// Set up the brain parser, pass it the hardware serial object you want to listen on.
Brain brain(Serial);

void setup() {
// 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.readErrors());
Serial.println(brain.readCSV());
}
}

It is giving me this error:

BrainSerialOut.cpp:5:19: error: Brain.h: No such file or directory
BrainSerialOut:7: error: 'Brain' does not name a type
BrainSerialOut.cpp: In function 'void loop()':
BrainSerialOut:18: error: 'brain' was not declared in this scope

What do I need to modify in the code for such error messages?

Any help is much appreciated! And if it works out all are welcome to come experience my installation that will hopefully be happening as a result of error message resolution!

BrainSerialOut.cpp:5:19: error: Brain.h: No such file or directory

You must fix this problem first.

What do I need to modify in the code for such error messages?

You need to download and properly install the Brain library, and then restart the IDE.

You have to install the Brain library. Put the library files in {your sketch folder}/libraries/Brain/

This might be what you need: https://github.com/kitschpatrol/Arduino-Brain-Library/downloads

Hello,
I am a new person. I am also getting the same error

BrainBlinker:11: error: 'Brain' does not name a type
BrainBlinker.ino: In function 'void loop()':
BrainBlinker:28: error: 'brain' was not declared in this scope
BrainBlinker:36: error: 'brain' was not declared in this scope

please help me!!

Hello,
I am a new person. I am also getting the same error

BrainBlinker:11: error: 'Brain' does not name a type
BrainBlinker.ino: In function 'void loop()':
BrainBlinker:28: error: 'brain' was not declared in this scope
BrainBlinker:36: error: 'brain' was not declared in this scope

please help me!!

You have the same problem so ....................

Mark

i am trying to connect my mindflex to my pc via arduino leonardo but i can't seem to make it send data packages to my serial monitor... Any idea what might be the problem? i did everything as described in the video tutorial but nothing shows up in my serial monitor..

Not sure why no one replied/resolved this since the last 5 years, but here is the resolution.

The problem everyone is getting is because the default Brain.zip file includes all files (including Brain.h) inside yet another folder called Brain which is why the Arduino IDE is unable to find the path for the .h file. (this is ostensibly an issue with the packager for Mac since I was able to successfully zzip up files in Windows and import into the library. On a Mac though, it inadvertently creates yet another brain folder within Brain.zip while packaging it)

So what you need to do is open up the zip, within which you will see a folder MacOSX and Brain. Access the Barin folder and select all files within it (including the examples folder) and cut them. Go out to the folder above so that now you are in the zip root and paste the files here. Now you will have all the files in the root of the zip and there will be an empty Brain folder. (you can delete this now to keep things clean)

Close the zip file and upload. this should now resolve the problems as the path will finally be correct.

@sidch

This was and is covered but not the MAC aspect in the attached PDF.
Would you mind if I used your tip ?

Bob.

Importing sketches and libraries v2.pdf (287 KB)