WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Wand 2014: Keypress RT timing (https://forum.worldviz.com/showthread.php?t=5132)

hodka 08-12-2014 04:28 AM

Wand 2014: Keypress RT timing
 
Hi,

I am using the PPT Wand 2014 using the "viz_wand_2014.py" included in Vizard 5.

I can easily detect whether a button is pressed using the following code:

ppt_wand = viz_wand_2014.add("localhost",3)
def wand_test():
if ppt_wand.isButtonDown(6):
print "-----"
print viz.tick()
print viz.getFrameTime()
vizact.ontimer(0,wand_test)

However, I have the problem that the timing is locked to the frame rate of the display. In order to aquire more accurate reaction time estimates, it would be great not to be restricted to the frame rate. I tried using the threading.Timer to call the wand_test function more frequently but it also returned the button state only once every frame.

Is there a way to receive a timestamp of when the button was pressed or have a callback function being called once the button is pressed without being restricted to the frame rate?

Jeff 08-13-2014 11:10 AM

There maybe a way to poll the button state more frequently using a separate thread. What kind of accuracy are you looking for? For high accuracy reaction timing results we recommend Cedrus response pads. They are supported by Vizard.


All times are GMT -7. The time now is 11:27 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC