Update sensor data before each reading.