Added the sensor controller code