fORP fibre optic (MR-compatible) response devices by CurrentDesigns: http://www.curdes.com/ This class is only useful when the fORP is connected via the serial port.
If you’re connecting via USB, just treat it like a standard keyboard.
E.g., use a Keyboard component, and typically listen for Allowed keys
'1', '2', '3', '4', '5'. Or use
Serial line interface to the fORP MRI response box.
To use this object class, select the box use setting serialPort, and connect the serial line. To emulate key presses with a serial connection, use getEvents(asKeys=True) (e.g., to be able to use a RatingScale object during scanning). Alternatively connect the USB cable and use fORP to emulate a keyboard.
fORP sends characters at 800Hz, so you should check the buffer frequently. Also note that the trigger event numpy the fORP is typically extremely short (occurs for a single 800Hz epoch).
Empty the input buffer of all characters
Resets the pressed statuses, so getEvents will return pressed buttons, even if they were already pressed in the last call.
getEvents(returnRaw=False, asKeys=False, allowRepeats=False)¶
Returns a list of unique events (one event per button pressed) and also stores a copy of the full list of events since last getEvents() (stored as ForpBox.rawEvts)
Returns a Python set of the unique (unordered) events of either a list given or the current rawEvts buffer