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).
should be a number (where 1=COM1, …)
the communication rate (baud), eg, 57600
A number with a bit set for every button currently pressed. Will be between 0 and 31.
For a given button press, returns a list buttons that went from unpressed to pressed. Also flags any unpressed buttons as unpressed.
a number with a bit set for every button currently pressed.
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() (stored as ForpBox.rawEvts)¶
return (not just store) the full event list
If True, will also emulate pyglet keyboard events, so that button 1 will register as a keyboard event with value “1”, and as such will be detectable using event.getKeys()
If True, this will return pressed buttons even if they were held down between calls to getEvents(). If the fORP is on the “Eprime” setting, you will get a stream of button presses while a button is held down. On the “Bitwise” setting, you will get a set of all currently pressed buttons every time a button is pressed or released. This option might be useful if you think your participant may be holding the button down before you start checking for presses.
Returns a Python set of the unique (unordered) events of either a list given or the current rawEvts buffer