[open] using dlportio to communicate with LPT
I am using OpenSesame 0.27.3 on a Windows 7/64 machine. I've downloaded and installed dlportio by the instructions. I am testing it with a slightly modified code from the example:
varvar=1 while varvar < 10: try: from ctypes import windll global io io = windll.dlportio # requires dlportio.dll !!! except: print 'The parallel port couldnt be opened' global io port = '0x378' try: io.DlPortWritePortUchar(port, varvar) print io.DlPortReadPortUchar(port) except: print 'Failed to send trigger!' self.sleep(500) varvar += 1
I expect to see the numbers from 1 to 9, but instead I see the number 148 which stays constant for the whole loop. The port address is correct -- if I use DirectRT, it will work just fine. I suspect that DlPortWritePortUchar is not working correctly. Can anyone suggest where to look for the problem?