File tree Expand file tree Collapse file tree 3 files changed +12
-16
lines changed
Example_01_SPI_RotationVector
Example_02_SPI_ResetCheck Expand file tree Collapse file tree 3 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ void setReports(void) {
90
90
} else {
91
91
Serial.println (" Could not enable rotation vector" );
92
92
}
93
+ delay (100 ); // This delay allows enough time for the BNO086 to accept the new
94
+ // configuration and clear its reset status
93
95
}
94
96
95
97
void loop () {
Original file line number Diff line number Diff line change @@ -80,14 +80,9 @@ void setup() {
80
80
}
81
81
Serial.println (" BNO08x found!" );
82
82
83
- if ( myIMU.requestResetReason () == true ) {
84
- Serial.print (F (" Reset Reason: " ));
85
- printResetReasonName (myIMU.getResetReason ());
86
- Serial.println ();
87
- }
88
- else {
89
- Serial.println (" Reset Reason Request failed." );
90
- }
83
+ Serial.print (F (" Reset Reason: " ));
84
+ printResetReasonName (myIMU.getResetReason ());
85
+ Serial.println ();
91
86
92
87
setReports ();
93
88
@@ -104,6 +99,8 @@ void setReports(void) {
104
99
} else {
105
100
Serial.println (" Could not enable gyro" );
106
101
}
102
+ delay (100 ); // This delay allows enough time for the BNO086 to accept the new
103
+ // configuration and clear its reset status
107
104
}
108
105
109
106
void loop () {
@@ -115,14 +112,9 @@ void loop() {
115
112
// different resets.
116
113
if (myIMU.wasReset ()) {
117
114
Serial.println (" ------------------ BNO08x has reset. ------------------ " );
118
- if ( myIMU.requestResetReason () == true ) {
119
- Serial.print (F (" Reset Reason: " ));
120
- printResetReasonName (myIMU.getResetReason ());
121
- Serial.println ();
122
- }
123
- else {
124
- Serial.println (" Reset Reason Request failed." );
125
- }
115
+ Serial.print (F (" Reset Reason: " ));
116
+ printResetReasonName (myIMU.getResetReason ());
117
+ Serial.println ();
126
118
127
119
setReports (); // We'll need to re-enable reports after any reset.
128
120
}
Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ void setReports(void) {
91
91
} else {
92
92
Serial.println (" Could not enable rotation vector" );
93
93
}
94
+ delay (100 ); // This delay allows enough time for the BNO086 to accept the new
95
+ // configuration and clear its reset status
94
96
}
95
97
96
98
void loop () {
You can’t perform that action at this time.
0 commit comments