pythonpsychopyparallel-port

How to send data through parallel port in Python?


I need to send some data via parallel port using Python. And for this I am using psychopy.parallel module.

I have two Windows 7 x64 machines connected via parallel port. This connection is tested and working because it is used by another software to send data via LPT1 port.

I have installed the necessary libraries for psychopy.parallel as described here.

Here is my naive intuition:

Machine 1 (Sending data):

from psychopy import parallel
port = parallel.ParallelPort(address="0xC010")
port.setData(3) # sets just pin 2, 3 high

Checking on Machine 1

port.readData()
> 3

Checking on Machine 2 (Receiving data):

from psychopy import prallel
port = parallel.ParallelPort(address="0xEC00")
port.readData()
> 0 

I see that although I can set the pins correctly on Machine 1 and read the result, Machine 2 just gives me a 0.


Solution

  • There are a few options:

    PsychoPy sending triggers on 64bit OS