[open] TMS parallel port managing delays
I am running a visual behavioral experiment where subjects must make a size judgment one 2 elements presented on a picture (which one is larger) and then press left or right. Experiment works fine using psychopy back-end but now i want to add TMS on it.
In the experiment I present the picture during 200 ms. and I want to use 5 different delays (0-50-100-150-200 ms) in the TMS pulse. in order to "send" the pulse instruction to the TMS i just need to send a "1" pulse through the parallel port and then come back to "0" state.
So I have two problems at the moment:
1- On one side I can't use the parrallel_port plugin because the parallel port of the computer is an external card whose number is E010 ... what means it is the port number 57360 in decimal values, and this number in not covered by the port plugin. is there anyway to overcome this issue?
2- In the case I could use the plugin, is there any way to "tell" the plugging to "wait" for an x amount of time before sending the pulse?
I think that both problems could be solved using inline code , but looking in the forum I just found the posibility to use something like:
from ctypes import windll port = 889 dev = windll.inpout32 val = dev.Inp32(port) print "Read %d from port %d" % (val, port)
but when I tried OpensSesame launches an error saying that there is no module ctypes (I alreaddy installed inpout32.dll).
I am using OpenSesame is 2.9.7 Hesitant Heisenberg on a Windows 7 machine.
Any ideas? Recomendations?
Thanks in advance.