From 4dc4461004339b865a5a20850fba975a0e152040 Mon Sep 17 00:00:00 2001 From: Sarah Knepper Date: Thu, 15 Jan 2015 14:57:51 -0800 Subject: [PATCH] hmc5883l: Add comments to C++ example Signed-off-by: Sarah Knepper --- examples/hmc5883l.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/hmc5883l.cxx b/examples/hmc5883l.cxx index a06f06f9..8598eba5 100644 --- a/examples/hmc5883l.cxx +++ b/examples/hmc5883l.cxx @@ -30,11 +30,13 @@ int main(int argc, char **argv) { //! [Interesting] + // Instantiate on I2C upm::Hmc5883l* compass = new upm::Hmc5883l(0); int16_t *pos; compass->set_declination(0.2749); // Set your declination from true north in radians + // Print out the coordinates, heading, and direction every second while(true){ compass->update(); // Update the coordinates pos = compass->coordinates();