.. highlight:: shell ============ Installation ============ To install BrainAccess, run this command in your terminal while in BrainAccess directory: .. code-block:: console $ pip install . or .. code-block:: console $ python setup.py install If you don't have `pip`_ installed, this `Python installation guide`_ or this `Anaconda environment installation guide`_ can guide you through the process. .. _pip: https://pip.pypa.io .. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/ .. _Anaconda environment installation guide: https://docs.anaconda.com/anaconda/install/ ======= Setup ======= Bluetooth connection setup -------------------------- To connect the BrainAccess device on windows: 1. Plug-in bluetooth adapter. Skip this step using an integrated bluetooth adapter. 2. Select BrainAccess device from the available bluetooth devices and connect. 3. Note which COM port is used by the device. Note: typically two com ports are shown 'incoming' and 'outgoing', 'outgoing is the once that's needed. 4. In the code enter the COM port when connecting - Asynchronous EEG acquisition example line 23 - EEG measurement example line 25 To connect the BrainAccess device on linux: 1. Plug-in bluetooth adapter. Skip this step using an integrated bluetooth adapter. Connect to the device via bluetooth. If using Ubuntu/GNOME, this can be done through the GNOME Control Center, or using the `bluetoothctl` or `bluez` tools as shown in ``examples/linux_setup/linux_setup_bluetooth_1.sh`` 2. Install the `bluez-utils` package (Ubuntu/Debian: `sudo apt install bluez-utils`) 3. Enter the following command: ``sudo rfcomm bind ``, where - `` is the port you will enter into the application to connect to the device (`/dev/`). By default, you should use `rfcomm0` - `` is the bluetooth address of the device (example: `B8:F0:09:AA:28:6A`) - Example command: ``sudo rfcomm bind rfcomm0 B8:F0:09:AA:28:6A`` - Example script ``examples/linux_setup/linux_setup_bluetooth_2.sh`` 4. Once finished, you can do `sudo rfcomm unbind ` to remove the port and free it for usage by another EEG device. Step 3 has to be repeated every time the PC is restarted. If you have trouble connecting to the device, turn it off, remove the device from the bluetooth menu in GNOME Control Center, kill any program that might be using the port, and try again (no need to unbind / bind the rfcomm port). While using the library enter the when connecting - Asynchronous EEG acquisition example line 21 - EEG measurement example line 23 Configuration file ------------------ Root directory of every program running BrainAccess should contain, ``bacore.json`` file describing acquisition parameters. Main components: - chunk_size: size of chunks to be acquired from core (Default: 25) - logging parameters for debugging. - model_path: custom location of models The example file is provided in the root directory of BrainAccess package .. include:: ../bacore.json :literal: