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: mbed BMI160 max32630fthr_pitch USBDevice Math
Orientation.h
00001 #include "mbed.h" 00002 #include "bmi160.h" 00003 #include "max32630fthr.h" 00004 #include "stdlib.h" 00005 00006 00007 00008 #include "USBSerial.h" 00009 #include "math.h" 00010 00011 00012 00013 void dumpImuRegisters(BMI160 &imu); 00014 void printRegister(BMI160 &imu, BMI160::Registers reg); 00015 void printBlock(BMI160 &imu, BMI160::Registers startReg, BMI160::Registers stopReg); 00016 void writeReg(BMI160 &imu, BMI160::Registers reg, uint8_t data); 00017 float compFilter(float K, float pitch, float gyroX, float accY, float accZ,float DT); 00018 00019 00020 class Orientation{ 00021 float pitch, time1, time2; 00022 float k; 00023 00024 00025 00026 00027 00028 00029 00030 public: 00031 void init(); 00032 float getPitch(); 00033 void updatePitch(); 00034 00035 00036 }; 00037 00038
Generated on Fri Jul 15 2022 04:03:02 by
1.7.2