Code for my timelapse project