I’m attempting to send triggers from a Dell laptop to my Neuroscan Grael System using the Labhacker USB2TTL interface. My Psychopy experiment features a button press followed by a sound at randomized intervals. I am able to get the button press trigger to appear, but not the sound trigger. I have uploaded the function file (auxiliary.py) which features my problem code on line 135. The serial port is open and closed in a separate experimental file. auxillary.py (6.1 KB)
I am a little confused by the code here as I cannot see where the serial port ser is configured - could you possible highlight where that is?
As a basic test, it might be useful to use a PsychoPy Builder file to see if that successfully sends triggers, In the current release (2023.2.3) you can use the serial port component directly to send serial port triggers.
I think you might need to close the pot in between ? at the moment it looks like in your auxillary code the ser.write() is sent twice at the same time ?