upm  0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
Public Member Functions

UPM module for the Grove Luminance Sensor. More...

Detailed Description

This sensor transforms luminous intensity to output analog values. It uses the APDS-9002 ambient light sensor.

// Instantiate a Grove Luminance sensor on analog pin A0
upm::APDS9002* luminance = new upm::APDS9002(0);
while (shouldRun)
{
int val = luminance->value();
cout << "Luminance value is " << val << endl;
sleep(1);
}

Public Member Functions

 APDS9002 (int pin)
 
 ~APDS9002 ()
 
int value ()
 

Constructor & Destructor Documentation

APDS9002 ( int  pin)

Grove luminance sensor constructor

Parameters
pinanalog pin to use
~APDS9002 ( )

APDS9002 Destructor

Member Function Documentation

int value ( )

Get the luminance value from the sensor

Returns
the luminance reading

The documentation for this class was generated from the following files: