Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Simon Nougaret

Junior Member
Registered:
Posts: 7
Reply with quote  #1 
Hello everyone,

I'm currently working on a very simple task using a touchscreen.
The monkey has to touch a central target and to maintain his touch for half a second.
I want to add the possibility to detect the touch of the monkey not only in the area of a defined target but also out of this area. 

The idea is that if the monkey touch out of the object, the trial has to be aborted.

Here the timing file:

CT = 1; 

wait_for_touch_CT = 5000
holding_CT = 500;
fix_radius = 3;


toggleobject(CT); % Appearence of the Central Target
ontarget = eyejoytrack('touchtarget', CT, fix_radius, wait_for_touch_CT); 

if ~ontarget %CT did not touch within the "wait_for_touch" time
trialerror(2); %Code for abort 2 : No touch
toggleobject(CT);%Disappereance of the CT
return
end

ontarget = eyejoytrack('releasetarget', CT, fix_radius, holding_CT);

if ~ontarget %If he releases the touch before the end of the holding time
trialerror(6); %Code for abort 6 : Precoce Relase
toggleobject(CT);%Disappereance of the CT
return
end


toggleobject(CT);
trialerror(0);
goodmonkey(50, 'NumReward',3);
set_iti(750);

My question is the following: 
Is there a way with the eyejoytrack function to say "out of the area of the object" ?

Thank you in advance for your response,
Simon Nougaret.
0
Jaewon

Administrator
Registered:
Posts: 727
Reply with quote  #2 
Interesting. Since touch input can be discontinuous, someone else may want this feature. Let me think about how to make this possible.
0
Jaewon

Administrator
Registered:
Posts: 727
Reply with quote  #3 
Hi Simon,

I made a solution for you. Please see the update note of the new package.

http://forums.monkeylogic.org/post/nimh-monkeylogic-2-8444337?pid=1303608809
0
Simon Nougaret

Junior Member
Registered:
Posts: 7
Reply with quote  #4 
Hi Jaewon, 

Thank you very much for your really quick update, it works perfectly!!

Actually, it also rose a second problem about the consideration of the early releases by the eyejoytrack function. I'll post it in a new topic.

Simon




0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.