Quickstart

This quickstart guide is for using a single HackEEG board (8 channels), and assumes you are familiar with Arduino, Python, and OpenBCI. If not, please see HackEEG Software Installation.

Using a Laptop

HackEEG has been tested on macOS, Linux, and Windows 10. Windows 10 support is new, if you have problems, please contact the mailing list.

  1. Install the Arduino IDE.

  2. Launch the Arduino IDE. Use the Boards Manager (Tools > Port > Programming Port > Boards Manager, search for “Arduino Due”) to install the Arduino SAM Boards package for the Arduino Due.

  3. Use the Library Manager (Sketch > Include Libraries > Manage Libraries) to install the ArduinoJson library (by Benoit Blanchon).

  4. Clone the Arduino driver firmware located here: HackEEG Arduino driver

  5. Use the Arduino IDE to compile the driver and upload it to the Arduino Due board.

  6. Follow the software setup for the Python client: HackEEG Python client documentation

  7. Install the Processing framework.

  8. Install the fork of OpenBCI_GUI:

    $ git clone https://github.com/adamfeuer/OpenBCI_GUI.git
    $ cd OpenBCI_GUI
    $ git checkout feature/lsl-input-and-clinical-eeg-bandpass-filter
    
  9. Using Processing, open the OpenBCI_GUI/OpenBCI_GUI directory that you cloned above and run the sketch. The OpenBCI GUI should launch. Don’t try to connect to an LSL stream yet– the stream needs to be running before trying to connect to it.

  10. Using the USB A-to-micro cable, plug the laptop into the Arduino Due’s Native Port.

  11. For a quick test to see if communication between the client and HackEEG board works, you can use the command line shell to blink the blue HackEEG board light. This will indicate whether the HackEEG is communicating with the laptop.

    1. Activate the Python virtual environment:

      $ pipenv shell
      
    2. Start the HackEEG shell:

      $ hackeeg_shell
      (hackeeg) blink
      Ok
      (hackeeg) version
      v0.3.0
      Ok
      (hackeeg) exit
      $
      

      The blue light on the HackEEG board should flash.

Streaming Data

  1. To stream data from internal test signals, printing 2000 samples to the terminal– you will see the HackEEG blue board LED flash briefly before the data starts printing:

    $ hackeeg_stream --channel-test --sps 500 --samples 2000
    
  2. To stream data from internal test signals continuously and send via Lab Streaming Layer (LSL):

    $ hackeeg_stream --channel-test --sps 500 --continuous --lsl
    
  3. To stream data from internal test signals continuously and send via Lab Streaming Layer (LSL) without printing to the terminal:

    $ hackeeg_stream --channel-test --sps 500 --continuous --lsl --quiet
    
  4. To stream data continuously from electrode input at 500 samples per second (SPS) at 24x gain and send via Lab Streaming Layer (LSL) without printing to the terminal:

    $ hackeeg_stream --sps 500 --gain 24 --continuous --lsl --quiet
    

OpenBCI

  1. Start the HackEEG LSL stream:

    $ hackeeg_stream --sps 500 --gain 24 --continuous --lsl --quiet
    
  2. To display the stream’s data, select Live (from Lab Streaming Layer) from the System Control Panel dialog. Leave the channel setting at 8 (the other two don’t work on this branch). Click Start Session.

  3. You should see some status messages in the console as OpenBCI GUI finds the stream and connects to it.

  4. Click Start Data Stream