mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
light: Added light sensor C source
Added the C source for the light sensor with necessary changes to cmake, examples, docs. * Renamed all files with grovelight to light * Replaced all instances of grovelight with light * Added C source for light sensor * Updated all cmake files * Added C example for light sensor * Split out light sensor from grove library Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -89,7 +89,7 @@ link_directories (${MRAA_LIBDIR})
|
||||
add_example (hmc5883l)
|
||||
add_example (groveled)
|
||||
add_example (groverelay)
|
||||
add_example (grovelight)
|
||||
add_example (light)
|
||||
add_example (grovetemp)
|
||||
add_example (grovebutton)
|
||||
add_example (groverotary)
|
||||
|
@ -25,14 +25,14 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include "grove.hpp"
|
||||
#include "light.hpp"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
//! [Interesting]
|
||||
// Create the light sensor object using AIO pin 0
|
||||
upm::GroveLight* light = new upm::GroveLight(0);
|
||||
upm::Light* light = new upm::Light(0);
|
||||
|
||||
// Read the input and print both the raw value and a rough lux value,
|
||||
// waiting one second between readings
|
Reference in New Issue
Block a user