writing sensor data