Go Down

Topic: Hacking a mindflex eeg device to control an electronical device (Read 347 times) previous topic - next topic

just_wing_it

So I've hacked a mindflex toy device to read the serial data using frontier nerds instructions. I wanted to know how I could use the serial data to turn on and off a 3-6V fan motor when the Attention and Meditation eSense values are detected? The only help online uses an HC-05 Bluetooth module, which I don't have, to power a much higher voltage fan. Is there no way I can program the arduino to just turn the power on when concentrating or is it much more complicated than that?
I've attached a screenshot of the serial monitor displaying the raw EEG data when the headset is on
Link to bluetooth controlled fan mentioned:https://www.instructables.com/id/Mind-Controlled-Fan-for-ALS-or-Paralyzed-patients/
Frontier nerd link for basic hack of EEG chip: http://www.frontiernerds.com/brain-hack
The code:
Code: [Select]
// Arduino Brain Library - Brain Serial Test

// Description: Grabs brain data from the serial RX pin and sends CSV out over the TX pin (Half duplex.)
// More info: https://github.com/kitschpatrol/Arduino-Brain-Library
// Author: Eric Mika, 2010 revised in 2014

#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());
    }
}

Any help would be much appreciated as I am very much a beginner out of my depth, thanks!

wvmarle

Here is some much needed help for you.. Please read it and follow the instructions. If you do, you may be able to get help for your project.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up