OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 3.1.5 32bit
Standard Standalone? (y/n) yes
What are you trying to achieve?: reading the parallel port with builder
I try to read the parallel port with builder because I want to use my response box instead of the keyboard for manual responses. I inserted a code element to read the port and it works as intended. I present a visual stimulus for the duration of one frame. The next routine in the flow reads the parallel port and does the rt-measurement. Stimulus still visible until keypress.
Code is as follows in the Begin Routine tab:
DONE = False startrt = ppclock.getTime() while not DONE: pptaste = port.readData() if pptaste != 255: DONE = True endrt = ppclock.getTime() RT = ( endrt - startrt )
Why I’m writing this post? Because Michael states (in the context of other questions) “… If using Code components in Builder, we can’t use
waitKeys() or loops, as Builder is structured around a screen refresh drawing loop that we can’t interrupt with code that will take longer than one screen refresh.” And that’s exactly what I do, I’m polling the parallel port with a loop of unknown duration. Shall I ignore my concerns? Better idea to realise my goal?
Thank you in advance - Sven