File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
examples/Example21-ResetCheck Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 15
15
16
16
#include " SparkFun_BNO080_Arduino_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_BNO080
17
17
18
- #define BNO08X_ADDR 0x4A
19
- // #define BNO08X_ADDR 0x4B
18
+ #define BNO08X_ADDR 0x4B // SparkFun BNO080 Breakout (Qwiic) defaults to 0x4B
19
+ // #define BNO08X_ADDR 0x4A // Alternate address if ADR jumper is closed
20
20
21
21
BNO080 myIMU;
22
22
@@ -53,15 +53,20 @@ void loop()
53
53
// Check resetReason() for the difference between different resets.
54
54
if (myIMU.hasReset ()) {
55
55
Serial.println (" ------------------ BNO085 has reset. ------------------ " );
56
- Serial.printf (" Reason: %i\n " ,myIMU.resetReason ());
56
+ Serial.print (F (" Reason: " ));
57
+ Serial.println (myIMU.resetReason ());
57
58
enableReports (); // We'll need to re-enable reports after any reset.
58
59
}
59
60
60
61
// Look for reports from the IMU
61
62
if (myIMU.dataAvailable ())
62
63
{
63
64
cyclecount++;
64
- Serial.printf (" [%2i] " ,cyclecount);
65
+
66
+ Serial.print (F (" [" ));
67
+ if (cyclecount < 10 ) Serial.print (F (" 0" ));
68
+ Serial.print (cyclecount);
69
+ Serial.print (F (" ] " ));
65
70
66
71
float x = myIMU.getGyroX ();
67
72
float y = myIMU.getGyroY ();
You can’t perform that action at this time.
0 commit comments