Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Serial port

I try to send 1 byte via serial port using inline_script (python). I would to trigger this script after keyboard response and only for specific stimuli. So, I place a "run if" [var]="yes" associated with another variable in the first sketchpad.
I have a first script in the beginning of my experiment

import serial
ser = serial.Serial ("COM5", 9600)

And my second script, after keyboard response is :

ser.write ('0')
print (ser)

The most minimalist codes of the world! But when I launch opensesame, it cratches only when stimuli associated by var "yes" arrive.
Do you have ideas my friends?


Sign In or Register to comment.