Class ButtonBox
source code
Serial line interface to the fORP MRI response box
Set the box use setting 0 or 1 and connect the serial line to
use this object class. (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).
|
|
__init__(self,
serialPort=1)
serialPort should be a number (where 1=COM1,...) |
source code
|
|
|
|
clearBuffer(self)
Empty the input buffer of all characters |
source code
|
|
|
|
getEvents(self,
returnRaw=False)
Returns a list of unique events (one event per button pressed)
AND stores a copy of the full list of events since last getEvents()
(stored as ForpBox.rawEvts) |
source code
|
|
|
|
getUniqueEvents(self,
fullEvts=None)
Returns a Python set of the unique (unordered) events of either
a list given or the current rawEvts buffer |
source code
|
|