Skip to main content

Send Focus Data from GUI to Arduino

Starting with GUI v5.0.0, this feature is temporarily deprecated until a more reliable and research-based Focus algorithm is implemented. If you would still like to use this widget, you can download and run GUI v4.2.0.

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?

Helpful Background Skills

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

Upload 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

Open GUI Synthetic Mode

Step 4 - Start Streaming

Open and Setup the Networking Widget

Setup Networking Widget

Open the Focus Widget. Then, click "Start Data Stream" and then "Start" in the Networking Widget

OpenBCI Serial Not Focused

Next, turn off channel one to simulate Focused state.

OpenBCI Serial Focused

The Arduino's built-in LED should blink when the Focus Widget reads "focused!"

How does the Focus Widget work? Check out this community post!

How can this be used to make something? Here's an example!

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: