upm  1.3.0
Sensor/Actuator repository for libmraa (v1.7.0)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions
APDS9002 Class Reference

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.

// 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;

Public Member Functions

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

Constructor & Destructor Documentation

APDS9002 ( int  pin)

APDS-9002 luminance sensor constructor

pinAnalog pin to use
~APDS9002 ( )

APDS9002 destructor

Member Function Documentation

int value ( )

Gets the luminance value from the sensor

Luminance value

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