Responding with two joysticks in one task using
Inquisit.
Example task for the participant: when the
vertical arrow pointing up is displayed move LEFT joystick forward. When the
displayed vertical arrow is pointing down move RIGHT joystick backward. These
are the correct answers. Other answers – e.g. arrow pointing up, right joystick
forward movement etc. are incorrect.
There are 4 possible responses: left forward
and backward, right forward and backward.
We assign letters to this responses for example
this way: left forward Q, left backward W, right forward E, right backward R.
Then we write a standard script in Inquisit
that displays us arrows and we set in appropriate point valid and correct
responses
/ validresponse =
("q", "w", "e", "r")
/ correctresponse
= ("q")
or
/ correctresponse
= ("r")
We connect two joysticks to the
computer. Next we need to download the GlovePIE program (http://glovepie.org/). This program helps to
map joystick movements onto buttons presses that we need. You don’t need to
instal the GlovePIE. Once you download it, you simply open it and use it.
In the GlovePIE program in the main window we
need to write a short script:
var.d = 0.25 //Joystick deadzone; set to whatever you need
Key.Q = Joystick1.y<-var.d
Key.W = Joystick1.y>var.d
Key.E = Joystick2.y<-var.d
Key.R = Joystick2.y>var.d
This script assigns forward movement with one
joystick to the Q button press, backward movement of the same device to W
button press etc.
Be careful with setting the deadzone value. To
small will mean that even gentle hand movements will be recorded, to high value
will mean that hand movement needs to very strong in order to be recorded.
Don’t forget to RUN the GlovePIE script before
running the Inquisit script!
Now everything should work. Run the experiment,
give few answers (right and wrong). I do it this way that if there is a 12
trials in total I first respond for 6 times only with the left hand and then 6
responses only with the right hand. I also try to keep following order of
responses: forward, backward, forward, backward etc. This is necessary for
checking which joystick is treated by the computer as the Joystick1 and which
as the Joystick2 (because we need to put the on the proper sides). In order to
do so you need to open the data file and look at the response recording. Remember
that Inquisit uses Scan Code, this is each key has a unique code. So key Q is
16, key W is 17, key E is 18 and key R is 19. Hence if you answering in the
following order: left forward, left backward, right forward, right leftward you
should obtain either this sequence 16,17,18,19 either this one 18,19,16,17. It
depends on that how your computer assigns real joysticks to Joystick1 and
Joystick2. My computer does it arbitrary. This I have got two joysticks Manta
and Genius and my computer sets Manta as the Joystick1 and Genius as the Joystick2
no matter to which comport I connect them and in which order (i.e. Manta first,
Genius second). I don’t know what is the rule unfortunately. That’s why I look
at data file and response recording. Maybe someone can help.
One important remark. As I said I have got
joysticks from two different producers. I expect that when two similar
joysticks are used they will be treated as two different devices by the
GlovePIE. This is I hope it won’t be the case that two joysticks of the same
producer will be seen as the same and will both submit responses to the
Joystick1 device for example, while the Joystick2 device won’t collect
responses. Again, maybe someone knows something about that – please tell.