clear all %in case the cameras were left open

%Variables
format_out = 'yyyy-mm-dd-HH.MM.SS';
out_folder = 'C:\Users\George\Desktop\images\';
delay_time = 5;
cam1_name = 'Logitech';
cam2_name = '';

%% Turn on cameras
cam1 = webcam(cam1_name);
%cam2 = webcam(cam2_name);

%% Check focus

%% Enter test details

%% Take photos and save them in loop
while 1
   img = snapshot(cam1);
   imwrite(img, strcat(out_folder, datestr(datetime, format_out), '.png'));
   pause(delay_time)
end