Added timer to take a picture every n seconds