Tsungta Wu / BNO055_AS7000

Fork of BNO055 by Sog Yang

Embed: (wiki syntax)

« Back to documentation index

BNO055 Class Reference

BNO055 Class Reference

Class for operating Bosch BNO055 sensor over I2C. More...

#include <BNO055.h>

Public Member Functions

 BNO055 (PinName SDA, PinName SCL)
 Create BNO055 instance.
void enable (void)
 Heart Rate Sensor Enbable API,it include startup senario.
void hr_only (void)
 Hreat Rate Sensor sensing and data.
void reset ()
 Perform a power-on reset of the BNO055.
bool check ()
 Check that the BNO055 is connected and download the software details and serial number of chip and store in ID structure.
void SetExternalCrystal (bool yn)
 Turn the external timing crystal on/off.
void setmode (char mode)
 Set the operation mode of the sensor.
void setpowermode (char mode)
 Set the power mode of the sensor.
void set_accel_units (char units)
 Set the output units from the accelerometer, either MPERSPERS or MILLIG.
void set_anglerate_units (char units)
 Set the output units from the gyroscope, either DEG_PER_SEC or RAD_PER_SEC.
void set_angle_units (char units)
 Set the output units from the IMU, either DEGREES or RADIANS.
void set_temp_units (char units)
 Set the output units from the temperature sensor, either CENTIGRADE or FAHRENHEIT.
void set_orientation (char units)
 Set the data output format to either WINDOWS or ANDROID.
void set_mapping (char orient)
 Set the mapping of the exes/directions as per page 25 of datasheet range 0-7, any value outside this will set the orientation to P1 (default at power up)
void get_accel (void)
 Get the current values from the accelerometer.
void get_gyro (void)
 Get the current values from the gyroscope.
void get_mag (void)
 Get the current values from the magnetometer.
void get_lia (void)
 Get the corrected linear acceleration.
void get_grv (void)
 Get the current gravity vector.
void get_quat (void)
 Get the output quaternion.
void get_angles (void)
 Get the current Euler angles.
void get_temp (void)
 Get the current temperature.
void get_calib (void)
 Read the calibration status register and store the result in the calib variable.
void read_calibration_data (void)
 Read the offset and radius values into the calibration array.
void write_calibration_data (void)
 Write the contents of the calibration array into the registers.

Data Fields

values accel
 Structures containing 3-axis data for acceleration, rate of turn and magnetic field.
angles euler
 Stucture containing the Euler angles as yaw, pitch, roll as scaled floating point and rawyaw, rawroll & rollpitch as the int16_t values loaded from the registers.
quaternion quat
 Quaternion values as w,x,y,z (scaled floating point) and raww etc...
char calib
 Current contents of calibration status register.
char calibration [22]
 Contents of the 22 registers containing offset and radius values used as calibration by the sensor.
chip ID
 Structure containing sensor numbers, software version and chip UID.
int temperature
 Current temperature.

Detailed Description

Class for operating Bosch BNO055 sensor over I2C.

Definition at line 196 of file BNO055.h.


Constructor & Destructor Documentation

BNO055 ( PinName  SDA,
PinName  SCL 
)

Create BNO055 instance.

Definition at line 7 of file BNO055.cpp.


Member Function Documentation

bool check (  )

Check that the BNO055 is connected and download the software details and serial number of chip and store in ID structure.

Definition at line 39 of file BNO055.cpp.

void enable ( void   )

Heart Rate Sensor Enbable API,it include startup senario.

Definition at line 302 of file BNO055.cpp.

void get_accel ( void   )

Get the current values from the accelerometer.

Definition at line 139 of file BNO055.cpp.

void get_angles ( void   )

Get the current Euler angles.

Definition at line 213 of file BNO055.cpp.

void get_calib ( void   )

Read the calibration status register and store the result in the calib variable.

Definition at line 231 of file BNO055.cpp.

void get_grv ( void   )

Get the current gravity vector.

Definition at line 187 of file BNO055.cpp.

void get_gyro ( void   )

Get the current values from the gyroscope.

Definition at line 151 of file BNO055.cpp.

void get_lia ( void   )

Get the corrected linear acceleration.

Definition at line 175 of file BNO055.cpp.

void get_mag ( void   )

Get the current values from the magnetometer.

Definition at line 163 of file BNO055.cpp.

void get_quat ( void   )

Get the output quaternion.

Definition at line 199 of file BNO055.cpp.

void get_temp ( void   )

Get the current temperature.

Definition at line 226 of file BNO055.cpp.

void hr_only ( void   )

Hreat Rate Sensor sensing and data.

Definition at line 319 of file BNO055.cpp.

void read_calibration_data ( void   )

Read the offset and radius values into the calibration array.

Definition at line 236 of file BNO055.cpp.

void reset (  )

Perform a power-on reset of the BNO055.

Definition at line 30 of file BNO055.cpp.

void set_accel_units ( char  units )

Set the output units from the accelerometer, either MPERSPERS or MILLIG.

Definition at line 70 of file BNO055.cpp.

void set_angle_units ( char  units )

Set the output units from the IMU, either DEGREES or RADIANS.

Definition at line 96 of file BNO055.cpp.

void set_anglerate_units ( char  units )

Set the output units from the gyroscope, either DEG_PER_SEC or RAD_PER_SEC.

Definition at line 83 of file BNO055.cpp.

void set_mapping ( char  orient )

Set the mapping of the exes/directions as per page 25 of datasheet range 0-7, any value outside this will set the orientation to P1 (default at power up)

Definition at line 258 of file BNO055.cpp.

void set_orientation ( char  units )

Set the data output format to either WINDOWS or ANDROID.

Definition at line 122 of file BNO055.cpp.

void set_temp_units ( char  units )

Set the output units from the temperature sensor, either CENTIGRADE or FAHRENHEIT.

Definition at line 109 of file BNO055.cpp.

void SetExternalCrystal ( bool  yn )

Turn the external timing crystal on/off.

Definition at line 62 of file BNO055.cpp.

void setmode ( char  mode )

Set the operation mode of the sensor.

Definition at line 129 of file BNO055.cpp.

void setpowermode ( char  mode )

Set the power mode of the sensor.

Definition at line 134 of file BNO055.cpp.

void write_calibration_data ( void   )

Write the contents of the calibration array into the registers.

Definition at line 247 of file BNO055.cpp.


Field Documentation

values accel

Structures containing 3-axis data for acceleration, rate of turn and magnetic field.

x,y,z are the scale floating point values and rawx, rawy, rawz are the int16_t values read from the sensors

Definition at line 263 of file BNO055.h.

char calib

Current contents of calibration status register.

Definition at line 272 of file BNO055.h.

char calibration[22]

Contents of the 22 registers containing offset and radius values used as calibration by the sensor.

Definition at line 274 of file BNO055.h.

angles euler

Stucture containing the Euler angles as yaw, pitch, roll as scaled floating point and rawyaw, rawroll & rollpitch as the int16_t values loaded from the registers.

Definition at line 266 of file BNO055.h.

chip ID

Structure containing sensor numbers, software version and chip UID.

Definition at line 276 of file BNO055.h.

quaternion quat

Quaternion values as w,x,y,z (scaled floating point) and raww etc...

as int16_t loaded from the registers

Definition at line 269 of file BNO055.h.

Current temperature.

Definition at line 278 of file BNO055.h.