--- /dev/null
+//\r
+// LightSensor.h\r
+//\r
+// Copyright 2009 by Takashi Chikamasa, Jon C. Martin and Robert W. Kramer\r
+//\r
+\r
+#ifndef LIGHTSENSOR_H_\r
+#define LIGHTSENSOR_H_\r
+\r
+#include "Sensor.h"\r
+\r
+namespace ecrobot\r
+{\r
+/**\r
+ * NXT Light sensor class.\r
+ */\r
+class LightSensor: public Sensor\r
+{\r
+public:\r
+ /**\r
+ * Constructor (turn on the lamp by default).\r
+ * Note:<BR>\r
+ * This class must be constructed as a global object. Otherwise, a device assertion will be displayed<BR>\r
+ * in the LCD when the object is constructed as a non global object.<BR>\r
+ * When the object is destructed while the system is shut down, the device is de-activated automatically.\r
+ * @param port Light sensor connected port\r
+ * @param lamp Turn on/off the lamp (true:on/false:off)\r
+ * @return -\r
+ */\r
+ explicit LightSensor(ePortS port, bool lamp = true);\r
+\r
+ /**\r
+ * Destructor (turn off the lamp if it was on).\r
+ * @param -\r
+ * @return -\r
+ */\r
+ ~LightSensor(void);\r
+\r
+ /**\r
+ * Get brightness.\r
+ * @param -\r
+ * @return Brightness value (greater value means brighter)\r
+ */\r
+ S16 getBrightness(void) const;\r
+\r
+ /**\r
+ * Turn on/off the lamp.\r
+ * @param lamp true:on/false:off\r
+ * @return -\r
+ */\r
+ void setLamp(bool lamp);\r
+};\r
+}\r
+\r
+#endif\r