|
Using Arduino to reward during eye calibrating December 16, 2022 08:00AM | Registered: 2 years ago Posts: 14 |
|
Re: Using Arduino to reward during eye calibrating December 16, 2022 02:09PM | Admin Registered: 6 years ago Posts: 999 |
|
Re: Using Arduino to reward during eye calibrating December 28, 2022 06:08AM | Registered: 2 years ago Posts: 14 |
function alert_function(hook,MLConfig,TrialRecord)
switch hook
case 'task_start' % when the task starts by '[Space] Start' from the pause menu
global a
if isempty(a)
a = arduino();
end
disp("START!!!")
case 'block_start'
case 'trial_start'
case 'trial_end'
case 'block_end'
case 'task_end' % when the task finishes succesfully
case 'task_aborted' % when the task stops with an error
case 'task_paused' % when the task is paused with ESC during the task
case 'task_resumed' % when the task is resumed by '[Space] Resume' from the pause menu
end
end
function goodmonkey_xx(duration)
global a
writeDigitalPin(a, 'D8', 1);
pause(duration/1000); % reward duration
writeDigitalPin(a, 'D8', 0);
disp("reward!!")
end
|
Re: Using Arduino to reward during eye calibrating January 08, 2023 10:34AM | Admin Registered: 6 years ago Posts: 999 |
goodmonkey(duration,'juiceline','D8');
|
Re: Using Arduino to reward during eye calibrating January 14, 2023 12:56PM | Registered: 2 years ago Posts: 14 |
MLConfig.DAQ.set_reward_object(MLConfig,'arduino')to the mlcalibrate_origin_gain.m file made this eye calibration GUI work normally (Figure 2 in the attachment) and give rewards during calibration successfully. Could I modify it this way to give rewards for calibration?
|
Re: Using Arduino to reward during eye calibrating January 16, 2023 05:42AM | Registered: 2 years ago Posts: 14 |
|
Re: Using Arduino to reward during eye calibrating January 17, 2023 01:27PM | Admin Registered: 6 years ago Posts: 999 |
The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.