mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
hmc5883l: improve documentation and sample
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
add_executable (compass compass.cxx)
|
||||
add_executable (hmc5883l-example hmc5883l.cxx)
|
||||
add_executable (groveled groveled.cxx)
|
||||
add_executable (grovetemp grovetemp.cxx)
|
||||
add_executable (lcm-lcd lcm-lcd.cxx)
|
||||
@ -67,7 +67,7 @@ include_directories (${PROJECT_SOURCE_DIR}/src/tcs3414cs)
|
||||
include_directories (${PROJECT_SOURCE_DIR}/src/th02)
|
||||
include_directories (${PROJECT_SOURCE_DIR}/src/lsm303)
|
||||
|
||||
target_link_libraries (compass hmc5883l ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (hmc5883l-example hmc5883l ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (groveled grove ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (grovetemp grove ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (lcm-lcd i2clcd ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
@ -27,9 +27,10 @@
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
// Use i2c device 0 all the time
|
||||
//! [Interesting]
|
||||
upm::Hmc5883l* compass = new upm::Hmc5883l(0);
|
||||
fprintf(stdout, "heading: %f\n", compass->heading());
|
||||
//! [Interesting]
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user