Creates a light sensor at the specified address.
-
Parameters:
-
addr - One of Sensor::s1, Sensor::s2, Sensor::s3 or Sensor::battery.
-
active - Flag to activate sensor alimentation. With alimentation, the sensor measures reflectivity, without alimentation it samples ambient light level.