Hello all,
I am using Matlab 7.8.0 and PTB-3 on a win 64-bit operating system.
I am trying to record various keypresses simultaneously with a Fiber Optic Response Pad (FORP) and I can't seem to make it work!!:/ I am using a current design FORP model : FIU-004EU. The weird thing is that it works perfectly with a simple keypress but once I have to record two keypresses simultaneously it doesn't work. If I use the keyboard instead of the FORP it works fine. I don't understand why it does not work with the FORP since it is suppose to function as a keyboard... Thus I don't know if my script is incorrect or FORP can only send one signal at a time?
This is what I wrote (I am no programmer so please be gentle :)):
%Initialization
clear all %delete all pre-existing variables
close all %close all pre-opened windows
%Opening PTB
Screen('Preference', 'Verbosity', 2)
Screen('Preference', 'SkipSyncTests', 1)
[w, wrect]=Screen('OpenWindow', 0);
HideCursor;
[width, height] = Screen('WindowSize', w);
%Bienvenue
Screen(w, 'TextFont', 'Arial')
Screen(w, 'TextSize', 15)
Screen(w, 'TextStyle', 1)
DrawFormattedText(w, 'Bienvenue', 'center', 'center', [0 0 0]);
DrawFormattedText(w, 'Appuyez sur une touche pour commencer l´expérience...', 'center' , round(height/1.7), [0 0 0]);
Screen(w, 'Flip')
KbName('UnifyKeyNames')
kc_gauche = KbName('1!');
kc_droite = KbName('6^');
while 1
[keyIsDown, secs, keyCode, deltaSecs] = KbCheck(-1);
% Check that pressed keycodes and the desired codes overlap
% If so, then exit loop
if keyCode(kc_gauche) && keyCode(kc_droite)
disp('ok');
break
end
end
ShowCursor;
%Closing PTB
Screen('CloseAll');
If you have any suggestion I would really much appreciate them!
Thanks,
Cristian Buc Calderon
I am using Matlab 7.8.0 and PTB-3 on a win 64-bit operating system.
I am trying to record various keypresses simultaneously with a Fiber Optic Response Pad (FORP) and I can't seem to make it work!!:/ I am using a current design FORP model : FIU-004EU. The weird thing is that it works perfectly with a simple keypress but once I have to record two keypresses simultaneously it doesn't work. If I use the keyboard instead of the FORP it works fine. I don't understand why it does not work with the FORP since it is suppose to function as a keyboard... Thus I don't know if my script is incorrect or FORP can only send one signal at a time?
This is what I wrote (I am no programmer so please be gentle :)):
%Initialization
clear all %delete all pre-existing variables
close all %close all pre-opened windows
%Opening PTB
Screen('Preference', 'Verbosity', 2)
Screen('Preference', 'SkipSyncTests', 1)
[w, wrect]=Screen('OpenWindow', 0);
HideCursor;
[width, height] = Screen('WindowSize', w);
%Bienvenue
Screen(w, 'TextFont', 'Arial')
Screen(w, 'TextSize', 15)
Screen(w, 'TextStyle', 1)
DrawFormattedText(w, 'Bienvenue', 'center', 'center', [0 0 0]);
DrawFormattedText(w, 'Appuyez sur une touche pour commencer l´expérience...', 'center' , round(height/1.7), [0 0 0]);
Screen(w, 'Flip')
KbName('UnifyKeyNames')
kc_gauche = KbName('1!');
kc_droite = KbName('6^');
while 1
[keyIsDown, secs, keyCode, deltaSecs] = KbCheck(-1);
% Check that pressed keycodes and the desired codes overlap
% If so, then exit loop
if keyCode(kc_gauche) && keyCode(kc_droite)
disp('ok');
break
end
end
ShowCursor;
%Closing PTB
Screen('CloseAll');
If you have any suggestion I would really much appreciate them!
Thanks,
Cristian Buc Calderon