psychopy/psychopy — pull request #112 by lindeloev (2012-02-25 16:45:28+00:00)
Title: Addition of "duration" argument to parallel.setData()

Added optional argument for parallel.setData() to send a brief pulse. This is how I always send triggers when doing EEG. So

parallel.setData(32)
core.wait(0.020)
parallel.setData(0)

can be replaced by

parallel.setData(32, 0.020)

It could be nice to read the current state of the parallel port and revert to that instead of 0 after this duration. But I don't see that option in contrib/parallel.py?

The addition of this duration-argument could also be applied to parallel.setPin().

Best,
Jonas