Skip to content

Commit

Permalink
Cleaned up output text, and added cal data by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Townsend authored and Kevin Townsend committed Sep 2, 2015
1 parent 94d672f commit 32ddee6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/sensorapi/sensorapi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void displaySensorStatus(void)
bno.getSystemStatus(&system_status, &self_test_results, &system_error);

/* Display the results in the Serial Monitor */
Serial.println("");
Serial.print("System Status: 0x");
Serial.println(system_status, HEX);
Serial.print("Self Test: 0x");
Expand Down Expand Up @@ -107,7 +108,7 @@ void displayCalStatus(void)
Serial.print(" A:");
Serial.print(accel, DEC);
Serial.print(" M:");
Serial.println(mag, DEC);
Serial.print(mag, DEC);
}

/**************************************************************************/
Expand All @@ -134,7 +135,7 @@ void setup(void)
displaySensorDetails();

/* Optional: Display current status */
// displaySensorStatus();
displaySensorStatus();

bno.setExtCrystalUse(true);
}
Expand All @@ -160,7 +161,10 @@ void loop(void)
Serial.print(event.orientation.z, 4);

/* Optional: Display calibration status */
// displayCalStatus();
displayCalStatus();

/* Optional: Display sensor status (debug only) */
//displaySensorStatus();

/* New line for the next sample */
Serial.println("");
Expand Down

0 comments on commit 32ddee6

Please sign in to comment.