Revision c4f272e1 examples/rawdata/rawdata.ino

View differences:

examples/rawdata/rawdata.ino
18 18
*/
19 19

  
20 20
/* Set the delay between fresh samples */
21
#define BNO055_SAMPLERATE_DELAY_MS (500)
21
#define BNO055_SAMPLERATE_DELAY_MS (100)
22 22
   
23 23
Adafruit_BNO055 bno = Adafruit_BNO055();
24 24

  
......
52 52
  Serial.print(temp);
53 53
  Serial.println(" C");
54 54
  Serial.println("");
55
  
56
  bno.setExtCrystalUse(true);
55 57
}
56 58

  
57 59
/**************************************************************************/
......
73 75
  
74 76
  /* Display the floating point data */
75 77
  Serial.print("X: ");
76
  bno.printDouble(euler.x(), 1000);
77
  Serial.print("Y: ");
78
  bno.printDouble(euler.y(), 1000);
79
  Serial.print("Z: ");
80
  bno.printDouble(euler.z(), 1000);
78
  Serial.print(euler.x());
79
  Serial.print(" Y: ");
80
  Serial.print(euler.y());
81
  Serial.print(" Z: ");
82
  Serial.print(euler.z());
81 83
  Serial.println("");
82 84

  
83 85
  /*
84 86
  // Quaternion data
85 87
  imu::Quaternion quat = bno.getQuat();
86 88
  Serial.print("qW: ");
87
  bno.printDouble(quat.w(), 1000);
88
  Serial.print("qX: ");
89
  bno.printDouble(quat.y(), 1000);
90
  Serial.print("qY: ");
91
  bno.printDouble(quat.x(), 1000);
92
  Serial.print("qZ: ");
93
  bno.printDouble(quat.z(), 1000);
89
  Serial.print(quat.w(), 4);
90
  Serial.print(" qX: ");
91
  Serial.print(quat.y(), 4);
92
  Serial.print(" qY: ");
93
  Serial.print(quat.x(), 4);
94
  Serial.print(" qZ: ");
95
  Serial.print(quat.z(), 4);
94 96
  Serial.println("");
95 97
  */
96 98
  
97 99
  delay(BNO055_SAMPLERATE_DELAY_MS);
98
}
100
}

Also available in: Unified diff