mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
tcs3414cs: Add comments to C++ example for the Grove color sensor
Signed-off-by: Sarah Knepper <sarah.knepper@intel.com>
This commit is contained in:
parent
99700d7d1f
commit
69754c283f
@ -45,8 +45,11 @@ main(int argc, char **argv)
|
||||
{
|
||||
//! [Interesting]
|
||||
upm::tcs3414sc_rgb_t rgb;
|
||||
|
||||
// Instantiate the color sensor on I2C
|
||||
sensor = new upm::TCS3414CS ();
|
||||
|
||||
// Print out the r, g, b, and clr value every 0.5 seconds
|
||||
while (!doWork) {
|
||||
sensor->readRGB (&rgb);
|
||||
std::cout << (int)rgb.r << ", " << (int)rgb.g << ", " << (int)rgb.b << ", " << rgb.clr << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user