For Hepta-Sat Lite

Committer:
heptasat2021
Date:
Tue Aug 17 10:51:08 2021 +0000
Revision:
10:e752c65c7c56
Parent:
Hepta9axis.h@5:098423fb0371
For Hepta-Sat Lite

Who changed what in which revision?

UserRevisionLine numberNew contents of line
heptasat2021 10:e752c65c7c56 1 #ifndef MBED_HEPTA6AXIS_H
heptasat2021 10:e752c65c7c56 2 #define MBED_HEPTA6AXIS_H
hepta2ume 0:5aaec0996753 3 #include "mbed.h"
hepta2ume 0:5aaec0996753 4
heptasat2021 10:e752c65c7c56 5 class Hepta6axis
hepta2ume 0:5aaec0996753 6 {
hepta2ume 0:5aaec0996753 7 public:
HEPTA 3:d5eed0bb962e 8 I2C n_axis;
hepta2ume 0:5aaec0996753 9 int addr_accel_gyro;
heptasat2021 10:e752c65c7c56 10 Hepta6axis(
hepta2ume 0:5aaec0996753 11 PinName sda,
hepta2ume 0:5aaec0996753 12 PinName scl,
heptasat2021 10:e752c65c7c56 13 int aaddr
hepta2ume 0:5aaec0996753 14 );
hepta2ume 0:5aaec0996753 15 void setup();
hepta2ume 0:5aaec0996753 16 void sen_acc(float *ax,float *ay,float *az);
hepta2ume 0:5aaec0996753 17 void sen_gyro(float *gx,float *gy,float *gz);
heptasat2021 10:e752c65c7c56 18 //void sen_gyro_u16(char* gx_u16,char* gy_u16,char* gz_u16);
heptasat2021 10:e752c65c7c56 19 //void sen_acc_u16(char* ax_u16,char* ay_u16,char* az_u16);
hepta2ume 0:5aaec0996753 20
hepta2ume 0:5aaec0996753 21 private:
hepta2ume 0:5aaec0996753 22 char cmd[2];
heptasat2021 10:e752c65c7c56 23 char adata[1];
hepta2ume 0:5aaec0996753 24 char g1[8],g2[8];
hepta2ume 0:5aaec0996753 25 char a1[8],a2[8];
heptasat2021 10:e752c65c7c56 26 char xl[1],xh[1],yl[1],yh[1],zl[1],zh[1];
heptasat2021 10:e752c65c7c56 27 char gxl[1],gxh[1],gyl[1],gyh[1],gzl[1],gzh[1];
heptasat2021 10:e752c65c7c56 28 //char xl[1],xh[1],yl[1],yh[1],zl[1],zh[1];
HEPTA 4:01941772f493 29 short int st2;
heptasat2021 10:e752c65c7c56 30 //short int xl,xh,yl,yh,zl,zh;
heptasat2021 10:e752c65c7c56 31 //short int gxl,gxh,gyl,gyh,gzl,gzh;
hepta2ume 0:5aaec0996753 32 };
hepta2ume 0:5aaec0996753 33
hepta2ume 0:5aaec0996753 34 #endif