Author: Felix A. Maldonado Osorio
Affiliation: Drexel University, PHL, PA
This project is intended for data synchronization between OpenVibe BCI platform and Tobii eyetracker system via Arduino system.
This project is being conducted at Drexel University's Cognitive Neuroengineering and Quantitative Experimental Research (CONQUER) Collaborative Laboratory under the supervision of Dr. Hasan Ayaz.
To install requirements, run the following in your environment:
pip install -r requirements.txt
Recieves keyboard stimulus from OpenVibe
software via TCP
and forwards trigger to Tobii
eye-tracker system. This code waits for keyboard input and saves external stimulus' information on count
,elapsed_time
, and '''delay_time'''. Timestamps can also be saved on OpenVibe directly if needed.
TCP_IP = ''
: Server IP address. Default tolocalhost = 127.0.0.1
.TCP_PORT = 5678
: DefaultTCP Writer
Box port. Can be changed within OpenVibe.
How to run: (Has not been updated for app implementation)
- You can check host port on Windows by:
Settings>Network & internet > Wi-Fi > "your_network"
and locateIPv4 address: x:x:x:x
- To check if connected, run
ping -c 1 host_port
on RaspberryPi.- Tip: Use VNC Viewer or SSH to remotely connect and run scripts on RaspberryPi, removing need for monitor and peripherals.
- Change
TCP_PORT = "127.0.0.1"
andTCP_PORT = 5678
to necessary values. - Run
main.py
. - Send stimulus by pressing any stim label key (e.g. 'a') on host computer, RaspberryPi is listening and forwards to Tobii. Stim labels can be found at 'stim_labels.png'
- To close:
- Click
CTRL+C
on command window.main.py
will saves each timestamp instantly.
- Click
OpenVibe
scenario. Press any assigned key to send stmiulus to Tobii eye-tracker. List can be found in resources/Stim_labels.png
.
test_blink.py
Simple LED blink program on RaspberryPi. Helpful to test circuit connection to output.test_stim_button.py
Sends stimulus to OpenVibe when pressing button.test_tcp.py
Connects toOpenVibe
port and sends periodic stimulus to host.ping.py
(Unstable on RaspberrryPi). Sends ping to host computer. Run beforemain.py
to ensure connectivity.
Stores test data into .csv
format with columns count, elapsed_time, delay_time
with date when main.py
is ran.
(In no specific order)
- add functionality to run upon startup (this is done on individual RaspberryPi's) this removes the need to need RaspberryPi peripherals to run code.
- implement latency measurements
- update
delay_time
algorithm bug (calculates time from previous sent stimulus) - create a class module
RuntimeError: No access to /dev/mem. Try running as root!
(Ubuntu 18.04) This is a permissions issue, try running the following assudo
:
cd /dev
sudo chmod og+rwx gpio*
Now, run /unicorn-bci-cync/testcodes/test_blink.py
and you should not get the error again.