Changes to show preview of camera and capture image every 5 seconds