DATA UNITS OF sensor sen0250 BMI160
![userHead](https://dfimg.dfrobot.com/dfPortrait2.png)
Hi,
I can't figure out the data units from, gyroscope in the direction of the X, Y, and Z axis and acceleration in the direction of the X, Y, and Z axis I am getting from the following code:
#include "DFRobot_BMI160.h"
DFRobot_BMI160 bmi160;
const int8_t i2c_addr = 0x69;
void setup(){
Serial.begin(115200);
delay(100);
//init the hardware bmin160
if (bmi160.softReset() != BMI160_OK){
Serial.println("reset false");
while(1);
}
//set and init the bmi160 i2c address
if (bmi160.I2cInit(i2c_addr) != BMI160_OK){
Serial.println("init false");
while(1);
}
}
void loop(){
int i = 0;
int rslt;
int16_t accelGyro[6]={0};
//get both accel and gyro data from bmi160
//parameter accelGyro is the pointer to store the data
rslt = bmi160.getAccelGyroData(accelGyro);
if(rslt == 0){
for(i=0;i<6;i ){
if (i<3){
//the first three are gyro datas
Serial.print(accelGyro*3.14/180.0);Serial.print("\t");
}else{
//the following three data are accel datas
Serial.print(accelGyro/16384.0);Serial.print("\t");
}
}
Serial.println();
}else{
Serial.println("err");
}
}
Could you please help me? I've read the #include "DFRobot_BMI160.h" file, but still I am unable to figure out the data units I am getting. m/s^2 or º/s^2 (?) maybe, thanks.
I can't figure out the data units from, gyroscope in the direction of the X, Y, and Z axis and acceleration in the direction of the X, Y, and Z axis I am getting from the following code:
#include "DFRobot_BMI160.h"
DFRobot_BMI160 bmi160;
const int8_t i2c_addr = 0x69;
void setup(){
Serial.begin(115200);
delay(100);
//init the hardware bmin160
if (bmi160.softReset() != BMI160_OK){
Serial.println("reset false");
while(1);
}
//set and init the bmi160 i2c address
if (bmi160.I2cInit(i2c_addr) != BMI160_OK){
Serial.println("init false");
while(1);
}
}
void loop(){
int i = 0;
int rslt;
int16_t accelGyro[6]={0};
//get both accel and gyro data from bmi160
//parameter accelGyro is the pointer to store the data
rslt = bmi160.getAccelGyroData(accelGyro);
if(rslt == 0){
for(i=0;i<6;i ){
if (i<3){
//the first three are gyro datas
Serial.print(accelGyro*3.14/180.0);Serial.print("\t");
}else{
//the following three data are accel datas
Serial.print(accelGyro/16384.0);Serial.print("\t");
}
}
Serial.println();
}else{
Serial.println("err");
}
}
Could you please help me? I've read the #include "DFRobot_BMI160.h" file, but still I am unable to figure out the data units I am getting. m/s^2 or º/s^2 (?) maybe, thanks.