ColorSensor.class is new! Use it insted of LightSensor.