adding python code used on Raspberry Pi