Thread Tools  
Junior Member
Join Date: May 2016
hsw1770 is on a distinguished road Posts: 3
pyxid with psychopy using lsc-400b, Posted May 31st, 2016 #1

I am using psychopy to run a fMRI experiment with a McBook pro.

In the scanner I am planning to use, there is a lsc-400b controller, which does not have any usb connection.

So, I got a usb-serial port, which has a male connector (I am not sure about the gender of the serial port of the lsc-400b controller at this moment, please let me know).

Regarding the software coding, to receive trigger pulse and subject's button responses,
I guess that using pyxid library is the solution.

so at the top of my code,

import pyxid

devices = pyxid.get_xid_devices()
dev = devices[0]
if dev.is_response_device():

Following the above,

noTrigger = True
while noTrigger:
if dev.response_queue_size() > 0:
ttlpulse = dev.get_next_response()
if ttlpulse['key'] == 4:
noTrigger = False

I think this kind of coding might work.
It waits for the trigger pulse and when the pulse is received, the script escapes the while loop and proceeds further.

Am I correct?
any advice and info are grateful!!
Reply With Quote
Join Date: Aug 2006
Location: San Pedro, CA
Hisham is on a distinguished road Posts: 1,202
Posted August 4th, 2016 #2
Unfortunately, we cannot provide support for users’ code.

Regarding the USB-serial port adapter, we recommend only part USB-COM-U13 from Saelig.
Reply With Quote
Thread Tools
Posting Rules
Forum Jump:
© Copyright Cedrus Corporation, 1991-2014.
All times are GMT -7. The time now is 01:42 PM.