removed for loop and installed while loop

for loop was not allowing changes to camera settings to get the new
settings. loop changed to while loop and added camera.capture after
day/night camera settings.  More Testing in Progress