Revision c4f272e1 examples/sensorapi/sensorapi.ino

View differences:

examples/sensorapi/sensorapi.ino
19 19
   ===========
20 20
   Connect SCL to analog 5
21 21
   Connect SDA to analog 4
22
   Connect VDD to 3.3V DC
22
   Connect VDD to 3-5V DC
23 23
   Connect GROUND to common ground
24 24
    
25 25
   History
......
28 28
*/
29 29

  
30 30
/* Set the delay between fresh samples */
31
#define BNO055_SAMPLERATE_DELAY_MS (500)
31
#define BNO055_SAMPLERATE_DELAY_MS (100)
32 32
   
33 33
Adafruit_BNO055 bno = Adafruit_BNO055(55);
34 34

  
......
84 84
  /* Display chip revision details (optional) */
85 85
  // bno.displayRevInfo();
86 86
  // Serial.println("");
87
  
88
  bno.setExtCrystalUse(true);
87 89
}
88 90

  
89 91
/**************************************************************************/
......
100 102
  
101 103
  /* Display the floating point data */
102 104
  Serial.print("X: ");
103
  bno.printDouble(event.orientation.x, 1000);
104
  Serial.print("Y: ");
105
  bno.printDouble(event.orientation.y, 1000);
106
  Serial.print("Z: ");
107
  bno.printDouble(event.orientation.z, 1000);
105
  Serial.print(event.orientation.x, 4);
106
  Serial.print("\tY: ");
107
  Serial.print(event.orientation.y, 4);
108
  Serial.print("\tZ: ");
109
  Serial.print(event.orientation.z, 4);
108 110
  Serial.println("");
109 111
  
110 112
  delay(BNO055_SAMPLERATE_DELAY_MS);

Also available in: Unified diff