need help using psychopy.serial for fMRI

19 views
Skip to first unread message

or duek

unread,
Dec 28, 2010, 10:31:51 AM12/28/10
to psychopy-users
Hi,
I want to write some small function that knows to wait for the fMRI
signal.
the signal is connected using RF connection (which I think is a serial
connection?).
So I want to use the new serial class.
can I write something like this?

import serial
ser = serial.Serial(0, 19200, timeout=0) # open first serial port
while True:
a=ser.read(25)
if a!=0:
break
else:
pass
?
Reply all
Reply to author
Forward
0 new messages