Hi there! Could anyone say, please, if there are any possibilities to implement Pupil Labs API to ioHub? Perhaps it’s not extremely difficult to add a new device to eyetrackers?)) Thank you very much!
If anyone was looking for solution:
We use Pupil Labs API:
from zmq_socket import ZMQsocket
from time import sleep, time
remote_ip = '192.168.0.2'
# local
# remote_ip = '127.0.0.1'
print('Make sure the ports match with Pupil Capture Remote Plugin and the one in zmq_pocket.py')
port = '50020'
socket = ZMQsocket(remote_ip,port)
socket.connect()
# Grab the time module for timesync
time_fn = time
# Sync time
print(socket.set_time(time_fn))
# Start the notifications plugin
socket.notify({'subject': 'start_plugin', 'name': 'Annotation_Capture', 'args': {}})
socket.start_recording()
And in the routine you want to send an annotation:
socket.annotation('90', 0)
In the end of experiment:
socket.stop_recording()
zmq_socket.py (3.3 KB)