function [vid, vid_src]=setupCamera()
% getSnapshot Get Snapshot from camera
vid = videoinput('winvideo',1,'I420_320x240');
vid.ReturnedColorSpace = 'grayscale';
vid_src = getselectedsource(vid);
vid_src.Contrast =15;
vid.FramesPerTrigger=5;
vid.FrameGrabInterval=3;
vid.TriggerRepeat=inf;
set(vid,'StartFcn',@imaqcallback)
set(vid,'TriggerFcn',@lights)
set(vid,'StopFcn',@imaqcallback)