I've recently started learning how to use PsychoPy, the psychopy.parallel
module, and binary representation. I hope someone can let me know whether I'm understanding things correctly.
On PsychoPy's website, it says these two functions set pins 2 and 3 to high:
parallel.setData(3)
parallel.setData(int("00000011",2))
I'm assuming these two functions set specifically pins 2 and 3 to high because the right-most 1 in parallel.setData(int("00000011",2))
refers to pin 2, and the 1 on the left to that refers to pin 3. If I'm correct, are the following correct?
To set pins 2, 3, 4, 5, and 8 high, I should use either of these:
parallel.setData(79)
parallel.setData(int("01001111",2))
Also, how do people usually decide which combination of pins to set high/low when programming an experiment (I'm trying to send two or more triggers during an EEG experiment in PsychoPy)? Or is it entirely up to me, as long as I know which combination of pins set to high/low is associated with which particular experimental event?
I really appreciate any help anyone can provide. Thanks a lot!