PsychoPy LabHackerUSB2TTL Trigger

Hey everyone!

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)

PsychoPy Version: 2023.2.3
OS: Windows 10 Enterprise I5 -8350U CPE @ 1.7GHz

Any help would be appreciated!

Hi There,

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.

Becca

Becca

Thank you for responding! Here is the experimental code where the serial port (ser) is configured. It is on line 15.
reward_test_active.py (6.5 KB)

Hi There,

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 ?

Becca