upm  0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
 All Data Structures Files Functions Variables 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.

apds9002.jpg
// 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)

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: