I am struggling to send triggers from Psychopy to the EEG software ActiView via a serial port.
Can please ask if someone knows a potential solution?
I use this cable:
I wrote the following script in Psychopy, and program itself can be run, but Actiview could not get any trigger.
My PC recognizes the cable as a serial port (COM10).
import serial port = serial.Serial("COM10",baudrate =115200) port.write(1) port.flush() port.close()
I tried the following script in Matlab, and Actiview could get triggers every 3 seconds. Therefore the problem is with my script in Psychopy. Can anyone please give advice? Thank you very much
if ~isempty(instrfind) fclose(instrfind); delete(instrfind); end OBJ = serial('COM10', 'Baudrate', 115200); set(OBJ, 'InputBufferSize', 2, 'OutputBufferSize', 4); fopen(OBJ); pause(0.1); tic while toc<30 fwrite(OBJ, 1); pause(3) end fclose(OBJ);
My desktop PC:Windows 7, 64 bit, No parallel port