add getSensorData function to Sensor class to get a pointer to the sensor data