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

API for the TCS3414CS Color Sensor. More...

Detailed Description

This module defines the TCS3414CS interface for the color sensor

// Instantiate the color sensor on I2C
// Print out the r, g, b, and clr value every 0.5 seconds
while (!doWork) {
std::cout << (int) rgb.r << ", " << (int) rgb.g << ", " << (int) rgb.b << ", " << rgb.clr
<< std::endl;

Public Member Functions

 TCS3414CS (int bus=0, int addr=DEFAULT_ADDR)
void readRGB (tcs3414sc_rgb_t *rgb)
void clearInterrupt ()
std::string name ()

Constructor & Destructor Documentation

TCS3414CS ( int  bus = 0,
int  addr = DEFAULT_ADDR 

Instantiates a TCS3414CS object

busNumber of the used bus
addrI2C address of the device

Member Function Documentation

void readRGB ( tcs3414sc_rgb_t rgb)

Gets the RGB value from the sensor.

rgbColor values
void clearInterrupt ( void  )

Clears interrupts.

std::string name ( )

Returns the name of the component

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