Brain Powered Brain State LED Lights

You can create your own brain status tracker with real live brain data!

Estimated Time 

1-2 hours

Number of People

1- 2 students per materials set

Necessary Supplies

  • One NeuroMaker BCI Unit
  • One Uno Board
  • USB cable 
  • 3 LED lights
  • 3 Current Limiting Resistors (recommended 250 Ohms)
  • 4 Male to Male Jumper Wires
  • 1 Breadboard

Necessary Program Files

Please see the code below

Pre Check Items

  • NeuroMaker BCI Unit is fully charged
  • NeuroMaker BCI Connect Software is running properly

Background

You can use the Serial feature on NeuroMaker BCI Connect to develop your own brain powered applications! In this example we will be controlling 3 different LED lights to show our current attention status.

Table of Contents

Project Instructions

Install Arduino IDE. This is the coding environment you will be using to program your hand gestures. Download the IDE via this link below: 

 https://www.arduino.cc/en/Main/Software

The Code

				
					
char attentionData;
int redLED = 10;
int yellowLED = 9;
int blueLED = 8;

void setup() {
  // put your setup code here, to run once:

pinMode(redLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(blueLED, OUTPUT);
Serial.begin(115200);

}

void loop() {
  // put your main code here, to run repeatedly:
while (Serial.available() > 0){
attentionData = Serial.read();
}
if (attentionData >= 0 && attentionData < 30){
  digitalWrite(redLED, LOW);
  digitalWrite(yellowLED, LOW);
  digitalWrite(blueLED, HIGH);
}
if (attentionData >= 30 && attentionData < 60){
  digitalWrite(redLED, LOW);
  digitalWrite(yellowLED, HIGH);
  digitalWrite(blueLED, LOW);
}
  if (attentionData >= 60 && attentionData < 100){
  digitalWrite(redLED, HIGH);
  digitalWrite(yellowLED, LOW);
  digitalWrite(blueLED, LOW);
  }
}
				
			

Video Guide