Another approach for reading temperature. Hopefully fixes race condition