I am trying to send audio stimulus triggers to actiview (biosemi eeg) through serial port. But I keep getting this error message "serial.serialutil.SerialException: could not open port ‘COM4’: PermissionError(13, ‘Access is denied.’, None, 5) ".
I am the admin and have rebooted the windows pc system, closed all other applications , restarted pyschopy but none worked. I also downloaded “Termite” as recommended by biosemi to check if the port COM4 is working alright and sending the right triggers. And that seems to be working fine.
import serial port=serial.Serial("COM4", baudrate=115200)
if t>=0.1 and not trigger: port.write(str.encode(chr(stim))) trigger=True