Team Alpha / Mbed 2 deprecated UserIntefaceLCD

Dependencies:   mbed mbed-rtos MLX90614

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers gyro.h Source File

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);