mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
grove: add documentation for grove module
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@ -29,7 +29,7 @@
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
// Use i2c device 0 all the time
|
||||
//! [Interesting]
|
||||
upm::GroveLed* led = new upm::GroveLed(2);
|
||||
std::cout << led->name() << std::endl;
|
||||
for (int i=0; i < 10; i++) {
|
||||
@ -38,6 +38,7 @@ main(int argc, char **argv)
|
||||
led->off();
|
||||
sleep(1);
|
||||
}
|
||||
//! [Interesting]
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -29,13 +29,14 @@
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
// Use i2c device 0 all the time
|
||||
//! [Interesting]
|
||||
upm::GroveTemp* s = new upm::GroveTemp(0);
|
||||
std::cout << s->name() << std::endl;
|
||||
for (int i=0; i < 10; i++) {
|
||||
std::cout << s->value() << std::endl;
|
||||
sleep(1);
|
||||
}
|
||||
//! [Interesting]
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user