added temperature sensor polling code