9axis-sensor library
Embed:
(wiki syntax)
Show/hide line numbers
Hepta9axis.h
00001 #ifndef MBED_HEPTA9AXIS_H 00002 #define MBED_HEPTA9AXIS_H 00003 #include "mbed.h" 00004 00005 class Hepta9axis 00006 { 00007 public: 00008 I2C n_axis; 00009 int addr_accel_gyro; 00010 int addr_compus; 00011 Hepta9axis( 00012 PinName sda, 00013 PinName scl, 00014 int aaddr, 00015 int agaddr 00016 ); 00017 void setup(); 00018 void sen_acc(float *ax,float *ay,float *az); 00019 void sen_gyro(float *gx,float *gy,float *gz); 00020 void sen_mag(float *mx,float *my,float *mz); 00021 void sen_gyro_u16(char* gx_u16,char* gy_u16,char* gz_u16); 00022 void sen_acc_u16(char* ax_u16,char* ay_u16,char* az_u16); 00023 void sen_mag_u16(char* mx_u16,char* my_u16,char* mz_u16); 00024 00025 private: 00026 char cmd[2]; 00027 char g1[8],g2[8]; 00028 char a1[8],a2[8]; 00029 char m1[8],m2[8]; 00030 short int st2; 00031 short int xl,xh,yl,yh,zl,zh; 00032 short int gxl,gxh,gyl,gyh,gzl,gzh; 00033 short int mxl,mxh,myl,myh,mzl,mzh; 00034 00035 }; 00036 00037 #endif
Generated on Thu Jul 14 2022 02:29:14 by 1.7.2