Adding the sensor code