Send Focus Data from GUI to Arduino
This tutorial shows you how to get started streaming data from the OpenBCI_GUI's Focus Widget via Serial connection to an Arduino UNO Rev3. Head HERE to find the OpenBCI/Arduino Focus Data tutorial in the updated Instructable format!
What do I need?
- The OpenBCI_GUI standalone app or Processing sketch
- An Arduino UNO, or other similar device
- An OpenBCI Board (Optional)
Helpful Background Skills
- Arduino Basics
- Knowledge of Arduino or C-based programming
- Experience running the OpenBCI GUI from the Processing IDE (Optional)
Step 1 - Load the Example in the Arduino IDE
The OpenBCI_GUI-FocusArduino.ino file is designed to serve as a simple starting point for creating your own Arduino project using data from the GUI over serial.
You can copy/paste the code from Github into the Arduino IDE or download the Docs and navigate to the example /OpenBCI_files/OpenBCI_GUI-FocusArduino/OpenBCI_GUI-FocusArduino.ino
.
Step 2 - Upload the Arduino sketch
After uploading the sketch, you can close or minimize the Arduino IDE, but keep the Arduino connected to the computer. The sketch we just uploaded is running!
Step 3 - Open OpenBCI_GUI in Synthetic Mode
Step 4 - Start Streaming
Open and Setup the Networking Widget
Open the Focus Widget. Then, click "Start Data Stream" and then "Start" in the Networking Widget.
Next, turn off channels 5 through 8 to simulate Relaxed state.
The Arduino's built-in LED should blink when the Focus Widget reads Relaxing
.
Step 5 - Learn! Create! Share!
From here, you can add more to your new Arduino project to react to Focus data from the OpenBCI_GUI:
Try controlling even more LEDs using the Arduino
Try controlling a motor or group of motors
Make a second copy of your project and make it a two player game!