WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Cedrus Response Pad? (https://forum.worldviz.com/showthread.php?t=4317)

Trevor 08-10-2012 11:56 AM

Cedrus Response Pad?
 
I'd like to use a Cedrus Response Pad RB Series for collecting response and timing data. I want to use it to replace simple keystrokes, but am not sure where to get started. Is there any documentation for using this with Vizard? Thanks.

Jeff 08-16-2012 04:26 PM

You can use the vizcedrus module. To connect to the pad use the following:
Code:

#Connect to cedrus pad
import vizcedrus
vizcedrus.open() #Default: port=1 , baudRate=19200

Then you can register callback functions for button events:
Code:

#Setup cedrus callbacks
def cedrusButtonDown(e):
        print e.button,'button down'

def cedrusButtonUp(e):
        e.button,'button up'

viz.callback(vizcedrus.BUTTONDOWN_EVENT,cedrusButtonDown)
viz.callback(vizcedrus.BUTTONUP_EVENT,cedrusButtonUp)



All times are GMT -7. The time now is 12:36 PM.

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