| Author |
Topic  |
|
|
stjacques
New Member

12 Posts |
Posted - Mar 28 2007 : 12:09:23 PM
|
The 8 button box is not consistently recording key presses during part of our cogent stimuli script. We use a 'waituntil' function where the participant has up to 30 sec to make their response, and then we use the 'readkeys' function to register any button responses made during the 30 sec wait. Is it possible that the 8-button box cannot register key presses that are made during a long delay?
example of cogent code:
waituntil(timeRunStart + timeCounter + trialLen*speed); readkeys; [key, t, n] = getkeydown;
Thanks! |
|
|
jim.voyvodic
BIAC Faculty
   
138 Posts |
Posted - Mar 28 2007 : 12:34:14 PM
|
All our tests of the 8-button box so far have shown every button press to immediately send an ASCII key code. I don't know anything about the waituntil/readkeys functions you are using but I suspect the problem is in the software.
To test this, you could run some other program and look at codes received while someone presses the buttons. The easiest program for this is probably Notepad, but almost anything will work. You should see a character appear whenever a button box response is pressed. If that happens then the problem is in your Cogent code. If not, we will have to look for another explanation (probably the hardware).
Which scanner has the button box that was giving you problems?
Jim |
 |
|
|
stjacques
New Member

12 Posts |
Posted - Mar 28 2007 : 12:52:33 PM
|
It was on the 4T scanner.
So, we had tested the button box and it was recording responses within the matlab window. Also, we have other button responses that are made following a shorter delay and those were recorded okay.
I also tested the script at the 4T scanner by going through several runs of our task and pressing the buttons on the 8-button box. Button responses were being recorded for all of the required responses in the script, but this was using a shorter delay for testing purposes.
We have tested the script extensively outside the scanner, and have had no difficulties with the button responses.
Thanks. |
Edited by - stjacques on Mar 28 2007 1:29:22 PM |
 |
|
|
jim.voyvodic
BIAC Faculty
   
138 Posts |
Posted - Mar 28 2007 : 1:51:57 PM
|
Okay, all of this sounds like the box is okay and it is your particular software that is a problem. If you can't fix that on your own post again to see if there is a Cogent or Matlab expert who can help you.
J |
 |
|
| |
Topic  |
|