Biosemi serial port triggering demo

All,
Looking back, some folks have had questions about how to get Psychopy to talk to the Biosemi-provided USB-to-parallel port cable. I’ve put together a small demo that shows how to make this work.

https://github.com/drmarcj/psychopy_biosemi_serial

-Marc-

3 Likes

Hi Marc,

Thanks a lot for this demo! Are the triggers in this demo sent at the start of each stimulus presentation (i.e. trigger sent once with each item)? I am just wondering why this is done within Each Frame tab…if it only needs to happen at the beginning of the trial, I would expect it within the Begin Routine tab (given that code_2 from the demo is added to the trial window). Why is this so?

Thanks!
Boba

You could have the trigger happen at the start of the routine. However in this case having it relative to the event is more flexible and does not assume the event happens right at the start of the trial. Consider a situation where you have three events per trial (audio stimulus, visual stimulus and keypress response). In that case you might want to send a trigger at the onset of each of these, so having a trigger just at the start of the routine will not work.

Thank you so much for sharing this Marc! This worked for sending triggers to my biosemi actiview2 via a Neurospec MBBT-S triggerbox! The only code change I made was commenting out the resetting of triggers to zero, as this is handled automatically by the triggerbox! Thank you!

I previously tried str.encode(‘1’) and bytes(chr(1), ‘utf-8’), however these were sending incoherent
and random trigger values to the biosemi actiview.