Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: QEI2 chair_BNO055 PID Watchdog VL53L1X_Filter ros_lib_kinetic
Dependents: wheelchairControlSumer2019
imu.cpp
- Committer:
- ryanlin97
- Date:
- 2018-07-17
- Revision:
- 4:29a27953fe70
File content as of revision 4:29a27953fe70:
#include "imu.h"
Imu::Imu(){
imu = new BNO055(SDA, SCL);
}
Imu::Imu(PinName sda_pin, PinName scl_pin){
imu = new BNO055(sda_pin, scl_pin);
}
void Imu::setup(){
imu.reset();
pc.printf("Bosch Sensortec BNO055 test program on \r\n");
while (imu.check() == 0) {
pc.printf("Bosch BNO055 is NOT available!!\r\n");
wait(.5);
}
pc.printf("Bosch Sensortec BNO055 available \r\n");
imu.set_accel_units(MPERSPERS);
imu.setmode(OPERATION_MODE_AMG);
imu.get_calib();
imu.write_calibration_data();
imu.set_angle_units(DEGREES);
}