LED: Added C Src and Example

Changed from Grove LED to LED.

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Abhishek Malik
2016-09-12 16:16:30 -07:00
committed by Noel Eck
parent 1caf805d2b
commit f9a36314fb
17 changed files with 481 additions and 10 deletions

View File

@ -87,7 +87,7 @@ link_directories (${MRAA_LIBDIR})
# mq? will use module gas
# grove* will use module grove
add_example (hmc5883l)
add_example (groveled)
add_example (led)
add_example (relay)
add_example (light)
add_example (temperature)

View File

@ -25,7 +25,7 @@
#include <unistd.h>
#include <iostream>
#include "grove.hpp"
#include "led.hpp"
int
main(int argc, char **argv)
@ -33,7 +33,7 @@ main(int argc, char **argv)
//! [Interesting]
// Create the Grove LED object using GPIO pin 2
upm::GroveLed* led = new upm::GroveLed(2);
upm::Led* led = new upm::Led(2);
// Print the name
std::cout << led->name() << std::endl;