#include </usr/src/redhat/BUILD/legOS/include/c++/sensor.h>
Class diagram for LightSensor:
Public Members | |||
![]() | ![]() | LightSensor (unsigned *addr = s1, int active = 1) | |
![]() | ![]() | Creates a light sensor at the specified address. More... | |
![]() | ![]() | unsigned | value () |
![]() | ![]() | Read light sensor value (0..100). |
LightSensor::LightSensor (unsigned * addr = s1, int active = 1) |
Creates a light sensor at the specified address.
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. |
unsigned LightSensor::value () [inline]
|