Wrong Label Triggers Sent
in OpenSesame
Hi everyone,
I need some help for my experiment. I will be doing an oddball EEG experiment where speech and non speech sounds will be presented. So I need to send 4 different types of triggers : two triggers for the vowel condition (one standard and one deviant) and two for the non-speech condition (one standard and one deviant).
However, I have tested my script in the lab and the wrong label for my triggers is being sent and I don't understand why. For instance, when I try to send '0', the trigger is registered as a 'S48'. Here's my part of script where the triggers are included. Could someone please point me in the right direction?
Thank you,
Kloe

Comments
Hi @Kloe ,
The
serialmodule expects byte strings (bytes), which you are indeed sending by first creating astr(unicode) object and then calling.encode()to turn in into abytesobjects. So far so good. However, the ASCII character '0' does is not represented by the byte 0, but rather by the byte 48. And that's why you're seeing S48.If you want to send byte values, you can first convert the
intto astrwithchr(), and then to abyteswith.encode(). Not very elegant perhaps, but it works:Does that make sense?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastian,
Sorry for the late reply, for some reasons I did not get any notification someone commented on my post. I was starting to loose hope!
I went to the lab and tried and it WORKED!! I almost teared up!
Thank you so much, I really appreciate that you took the time to comment :)
Kloe
Good to hear!
Check out SigmundAI.eu for our OpenSesame AI assistant!