modified program to read temps only once from sensors each cycle