Logging sensor data every 500ms