Code for temperature sensing on Raspberry Pi