Revision 0e2e2723

View differences:

Adafruit_BNO055.cpp
223 223

  
224 224
/**************************************************************************/
225 225
/*!
226
    @brief  Gets teh temperature in degrees celsius
227
*/
228
/**************************************************************************/
229
int8_t Adafruit_BNO055::getTemp(void)
230
{
231
  int8_t temp = (int8_t)(read8(BNO055_TEMP_ADDR));
232
  return temp;
233
}
234

  
235
/**************************************************************************/
236
/*!
226 237
    @brief  Gets a vector reading from the specified source
227 238
*/
228 239
/**************************************************************************/
Adafruit_BNO055.h
250 250
    
251 251
    imu::Vector<3>  getVector ( adafruit_vector_type_t vector_type );
252 252
    imu::Quaternion getQuat   ( void );
253
    int8_t          getTemp   ( void );
253 254

  
254 255
    /* Adafruit_Sensor implementation */
255 256
    bool  getEvent  ( sensors_event_t* );
examples/rawdata/rawdata.ino
45 45
  /* Display chip revision details (optional) */
46 46
  bno.displayRevInfo();
47 47
  Serial.println("");
48
  
49
  /* Display the current temperature */
50
  int8_t temp = bno.getTemp();
51
  Serial.print("Current Temperature: ");
52
  Serial.print(temp);
53
  Serial.println(" C");
54
  Serial.println("");
48 55
}
49 56

  
50 57
/**************************************************************************/

Also available in: Unified diff