Olimex OpenEEG: Difference between revisions

From Polyphasic Sleep Wiki
No edit summary
No edit summary
Line 93: Line 93:
=== Linux ===
=== Linux ===


==== OpenViBE installation =====
==== OpenViBE installation ====


Start by downloading the source code (version 3.6.0 was used in this guide).<ref name="openvibedownload" />
Start by downloading the stable source code (version 3.6.0 was used in this guide).<ref name="openvibedownload" /> Then, follow the [https://openvibe.inria.fr/build-instructions/ build instructions].
 
After running <code>conda env update -f conda/env_linux.yaml</code>, '''be sure to run''' <code>conda activate openvibe</code>. This step is required to build the program within the OpenViBE environment, even though it's not explicitly mentioned in the official instructions.
 
==== Configuring Acquisition Server ====
 
Run <code>sude dmesg -w</code> and plug in your device. This will help you identify the correct port (e.g. ttyUSB0).
 
Navigate to the <code>build/</code> directory of OpenViBE, then run <code>./bin/openvibe-designer</code>. Click Driver Properties, set Number of channels to 2, and set Device to the port you identified earlier (e.g. ttyUSB0).
 
You may also want to add your user to the <code>uucp</code> group and reboot to ensure proper permissions (<code>sudo usermod -a -G uucp <username></code>).
 
To reduce signal noise, open the Acquisition Server's Preferences menu. Set Drift Correction to Disable and click Apply. Then, go back to Driver Properties and adjust the sampling frequency to minimize drift.
 
To do this:
* Plug in your device.
* Click Connect and Play in the Acquisition Server.
* Observe the drift value over time.
* Try different sampling frequencies (e.g., 256, 257, etc.) to find the setting that causes the drift to change as slowly as possible.
 
==== Configuring Designer ====
 
Disconnect and close the Acquisition Server window. Then run <code>./bin/openvibe-designer</code>. Go to File -> New. In the search bar, type "acquisition" and drag ''Acquisition Client'' to the design workspace (to the left side of the interface). Repeat this process for ''Signal Display'' and ''CSV File Writer (Deprecated)''. Note: the deprecated CSV File Writer is required for compatibility with other software.
 
Configure the CSV File Writer by double clicking it. Use the folder button to choose where you want to save your sleep recordings. Set the filename to <code>record-[$core{date}-$core{time}].csv</code>. This will automatically include the date and time in the file name. Click Apply. Finally, close all OpenViBE windows.
 
==== Running OpenViBE ====
 
To record your sleep, enter the <code>build/</code> directory of OpenViBE. Then, run <code>./bin/openvibe-designer</code>. Press Connect and Play. Then, use another terminal tab to run


=== MacOS ===
=== MacOS ===