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 mbed-rtos MLX90614
gyro.h
00001 // MBED reference code for the ST Micro STEVAL-MKI124V1 header board 00002 // This board has: LPS331 pressure/temperature sensor, L3GD20 gyroscope and LSM303DLHC magnetometer/accelerometer 00003 // Code accesses each of the 3 MEMS sensors and calculates pressure, temp, heading, tilt, roll and angular velocity 00004 // Code is not optimized for efficienecy but instead for clarity of how you use the sensors 00005 // ST application note AN3192 was key in developing the tilt-corrected compass 00006 // Developed on an LPC1768 00007 // By Liam Goudge. March 2014 00008 00009 #define LSM303_on 00010 00011 #include "mbed.h" 00012 #include "MKI124V1.h" 00013 #include "math.h" 00014 #include "mlx90614.h" 00015 00016 float get_temperature(void); 00017 00018 char readByte(char address, char reg); 00019 00020 void writeByte(char address, char reg,char value); 00021 00022 void initSensors (void); 00023 00024 void LSM303 (SensorState_t * state); 00025 00026 void calc_avrg_ac(Result_avrg* result,int samples); 00027 00028 void calc_avrg_or(Result_avrg* result,int samples); 00029 00030 void calc_diff(Result_avrg* r1, Result_avrg* r2);
Generated on Thu Jul 14 2022 11:25:13 by
1.7.2