Using Arduino to reward during eye calibrating December 16, 2022 03:00AM |
Registered: 1 year ago Posts: 14 |
Re: Using Arduino to reward during eye calibrating December 16, 2022 09:09AM |
Admin Registered: 5 years ago Posts: 878 |
Re: Using Arduino to reward during eye calibrating December 28, 2022 01:08AM |
Registered: 1 year 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 05:34AM |
Admin Registered: 5 years ago Posts: 878 |
goodmonkey(duration,'juiceline','D8');
Re: Using Arduino to reward during eye calibrating January 14, 2023 07:56AM |
Registered: 1 year 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 12:42AM |
Registered: 1 year ago Posts: 14 |
Re: Using Arduino to reward during eye calibrating January 17, 2023 08:27AM |
Admin Registered: 5 years ago Posts: 878 |
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.