hello everyoneş
İ have a start push button whicjh is basically recording the position, date and 'time' when the mouse is on pointer/mouse cursor is on the canvas.
İt is on this format
ex:(X, Y, time) = (237, 393, 12-May-2022 13:03:55, 2&1!, AA4)
(X, Y, time) = (505, 437, 12-May-2022 13:03:55, 2&1!, AA4)
(X, Y, time) = (616, 452, 12-May-2022 13:03:56, 2&1!, AA4)
İ am more interested in the seconds. İs there anyway seconds can just be recorded?
İ would like to buid a Pause pushbutton that will pause just the 'time' to move (because the experiment is long so sometimes the user will need a break). İ dont have any idea on how to do it. Also what could be challenging is that i dont know how i could handle the 'Enable','off' and 'Enable','on' of the Start and stop callbacks
.
function Start_button_Callback(hObject, eventdata, handles)
handles.fileID = fopen('Start_Stop.txt','w');
handles.t = timer('ExecutionMode', 'fixedRate', ...
'TasksToExecute', Inf, ...
'TimerFcn', {@timerCallback, handles.finger});
set(handles.Start_button,'Enable','off');
guidata(hObject,handles);
function timerCallback(~,~,f)
fprintf(handles.fileID,'(X, Y, time) = (%g, %g, %s, %s, %s)\n', get(0, 'PointerLocation'), datetime('now'), ...
handles.amplitude{handles.exp_counter},handles.f_df{handles.exp_counter});
function Stop_button_Callback(hObject, eventdata, handles)
handles = guidata(hObject);
set(handles.Start_button,'Enable','on');
guidata(hObject,handles);
function pause_button_Callback(hObject, eventdata, handles)
guidata(hObject,handles);