PsychoPy provides an interface to the labjack U3 class with a couple of minor additions.
This is accessible by:
from psychopy.hardware.labjacks import U3
Except for the additional setdata function the U3 class operates exactly as that in the U3 library that labjack provides, documented here:
http://labjack.com/support/labjackpython
Note
To use labjack devices you do need also to install the driver software described on the page above
psychopy.hardware.labjacks.
U3
(debug=False, autoOpen=True, **kargs)¶Name: U3.__init__(debug = False, autoOpen = True, **openArgs)
Examples: Simplest: >>> import u3 >>> d = u3.U3()
For debug output: >>> import u3 >>> d = u3.U3(debug = True)
To open a U3 with Local ID = 2: >>> import u3 >>> d = u3.U3(localId = 2)
setData
(byte, endian='big', address=6701)¶Write 1 byte of data to the U3 port
parameters:
byte: the value to write (must be an integer 0:255)
endian: [‘big’ or ‘small’] ignored from 1.84 onwards; automatic?
- address: the memory address to send the byte to
- 6700 = FIO
- 6701 (default) = EIO (the DB15 connector)
- 6702 = CIO