Creates a light sensor at the specified address.More...
unsigned value ()
Read light sensor value (0..100).
Detailed Description
LEGO light sensor class.
Member Function Documentation
LightSensor::LightSensor (unsigned * addr = s1, int active = 1)
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.
The documentation for this class was generated from the following files: