Python code for Raspberry Pi based time lapse camera