upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Member Functions

UPM module for the APDS-9002 Luminance Sensor. More...

Detailed Description

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

apds9002.jpg
// Instantiate a Grove Luminance sensor on analog pin A0
upm::APDS9002 luminance(0);
while (shouldRun) {
int val = luminance.value();
cout << "Luminance value is " << val << endl;
upm_delay(1);
}

Public Member Functions

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

Constructor & Destructor Documentation

APDS9002 ( int  pin)

APDS-9002 luminance sensor constructor

Parameters
pinAnalog pin to use
~APDS9002 ( )

APDS9002 destructor

Member Function Documentation

int value ( )

Gets the luminance value from the sensor

Returns
Luminance value

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