1
1
/*
2
2
Using the BNO080 IMU
3
+
4
+ By: Boštjan Čadež (@badVibes--)
5
+ Date: April 3rd, 2020
6
+
7
+ Based on earlier examples
3
8
By: Nathan Seidle
4
9
SparkFun Electronics
5
10
Date: December 21st, 2017
8
13
Feel like supporting our work? Buy a board from SparkFun!
9
14
https://www.sparkfun.com/products/14586
10
15
11
- This example shows how to output the i/j/k/real parts of the rotation vector.
12
- https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
16
+ This example shows how to use the gyro integrated rotation vector
13
17
14
18
It takes about 1ms at 400kHz I2C to read a record from the sensor, but we are polling the sensor continually
15
19
between updates from the sensor. Use the interrupt pin on the BNO080 breakout to avoid polling.
16
20
17
21
Hardware Connections:
18
22
Attach the Qwiic Shield to your Arduino/Photon/ESP32 or other
19
23
Plug the sensor onto the shield
20
- Serial.print it out at 9600 baud to serial monitor.
24
+ Serial.print it out at 115200 baud to serial monitor.
21
25
*/
22
26
23
27
#include < Wire.h>
@@ -27,7 +31,7 @@ BNO080 myIMU;
27
31
28
32
void setup ()
29
33
{
30
- Serial.begin (9600 );
34
+ Serial.begin (115200 );
31
35
Serial.println ();
32
36
Serial.println (" BNO080 Read Example" );
33
37
@@ -39,7 +43,7 @@ void setup()
39
43
// // Start i2c and BNO080
40
44
// Wire.flush(); // Reset I2C
41
45
// IMU.begin(BNO080_DEFAULT_ADDRESS, Wire);
42
- // Wire.begin(4, 5);
46
+ // Wire.begin(4, 5);
43
47
// Wire.setClockStretchLimit(4000);
44
48
// //=================================
45
49
0 commit comments