timelapse capture function now uses the PiCamera API