9axis-sensor library
Hepta9axis.h@4:01941772f493, 2017-09-04 (annotated)
- Committer:
- HEPTA
- Date:
- Mon Sep 04 16:27:17 2017 +0000
- Revision:
- 4:01941772f493
- Parent:
- 3:d5eed0bb962e
- Child:
- 5:098423fb0371
Hepta9axis
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hepta2ume | 0:5aaec0996753 | 1 | #ifndef MBED_HEPTA9AXIS_H |
hepta2ume | 0:5aaec0996753 | 2 | #define MBED_HEPTA9AXIS_H |
hepta2ume | 0:5aaec0996753 | 3 | #include "mbed.h" |
hepta2ume | 0:5aaec0996753 | 4 | |
umeume | 2:306058b9d04e | 5 | class Hepta9axis |
hepta2ume | 0:5aaec0996753 | 6 | { |
hepta2ume | 0:5aaec0996753 | 7 | public: |
HEPTA | 3:d5eed0bb962e | 8 | I2C n_axis; |
hepta2ume | 0:5aaec0996753 | 9 | int addr_accel_gyro; |
hepta2ume | 0:5aaec0996753 | 10 | int addr_compus; |
umeume | 2:306058b9d04e | 11 | Hepta9axis( |
hepta2ume | 0:5aaec0996753 | 12 | PinName sda, |
hepta2ume | 0:5aaec0996753 | 13 | PinName scl, |
hepta2ume | 0:5aaec0996753 | 14 | int aaddr, |
hepta2ume | 0:5aaec0996753 | 15 | int agaddr |
hepta2ume | 0:5aaec0996753 | 16 | ); |
hepta2ume | 0:5aaec0996753 | 17 | void setup(); |
hepta2ume | 0:5aaec0996753 | 18 | void sen_acc(float *ax,float *ay,float *az); |
hepta2ume | 0:5aaec0996753 | 19 | void sen_gyro(float *gx,float *gy,float *gz); |
hepta2ume | 0:5aaec0996753 | 20 | void sen_mag(float *mx,float *my,float *mz); |
hepta2ume | 0:5aaec0996753 | 21 | void sen_gyro_u16(char* gx_u16,char* gy_u16,char* gz_u16, int *dsize); |
hepta2ume | 0:5aaec0996753 | 22 | void sen_acc_u16(char* ax_u16,char* ay_u16,char* az_u16, int *dsize); |
hepta2ume | 0:5aaec0996753 | 23 | void sen_mag_u16(char* mx_u16,char* my_u16,char* mz_u16, int *dsize); |
hepta2ume | 0:5aaec0996753 | 24 | |
hepta2ume | 0:5aaec0996753 | 25 | private: |
hepta2ume | 0:5aaec0996753 | 26 | char cmd[2]; |
hepta2ume | 0:5aaec0996753 | 27 | char g1[8],g2[8]; |
hepta2ume | 0:5aaec0996753 | 28 | char a1[8],a2[8]; |
hepta2ume | 0:5aaec0996753 | 29 | char m1[8],m2[8]; |
HEPTA | 4:01941772f493 | 30 | short int st2; |
hepta2ume | 0:5aaec0996753 | 31 | short int xl,xh,yl,yh,zl,zh; |
hepta2ume | 0:5aaec0996753 | 32 | short int gxl,gxh,gyl,gyh,gzl,gzh; |
hepta2ume | 0:5aaec0996753 | 33 | short int mxl,mxh,myl,myh,mzl,mzh; |
hepta2ume | 0:5aaec0996753 | 34 | |
hepta2ume | 0:5aaec0996753 | 35 | }; |
hepta2ume | 0:5aaec0996753 | 36 | |
hepta2ume | 0:5aaec0996753 | 37 | #endif |