![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Xbee countUP
Fork of HeptaXbee_CountUp by
hepta_sat/HeptaGyro.h@0:0a7fa0911e6c, 2016-12-09 (annotated)
- Committer:
- tomoya123
- Date:
- Fri Dec 09 04:58:00 2016 +0000
- Revision:
- 0:0a7fa0911e6c
Xbee CountUP
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tomoya123 | 0:0a7fa0911e6c | 1 | #ifndef MBED_HEPTAGYRO_H |
tomoya123 | 0:0a7fa0911e6c | 2 | #define MBED_HEPTAGYRO_H |
tomoya123 | 0:0a7fa0911e6c | 3 | #include "mbed.h" |
tomoya123 | 0:0a7fa0911e6c | 4 | |
tomoya123 | 0:0a7fa0911e6c | 5 | //3axis Gyro Sensor ML3GD20 |
tomoya123 | 0:0a7fa0911e6c | 6 | |
tomoya123 | 0:0a7fa0911e6c | 7 | class HeptaGyro{ |
tomoya123 | 0:0a7fa0911e6c | 8 | public: |
tomoya123 | 0:0a7fa0911e6c | 9 | I2C gyro; |
tomoya123 | 0:0a7fa0911e6c | 10 | int addr; |
tomoya123 | 0:0a7fa0911e6c | 11 | HeptaGyro( |
tomoya123 | 0:0a7fa0911e6c | 12 | PinName sda,// Gyro I2C port |
tomoya123 | 0:0a7fa0911e6c | 13 | PinName scl,// Gyro I2C port |
tomoya123 | 0:0a7fa0911e6c | 14 | int aaddr |
tomoya123 | 0:0a7fa0911e6c | 15 | ); |
tomoya123 | 0:0a7fa0911e6c | 16 | void setup(); |
tomoya123 | 0:0a7fa0911e6c | 17 | void sensing(float *gx,float *gy,float *gz); |
tomoya123 | 0:0a7fa0911e6c | 18 | void sensing_u16(char* gx_u16,char* gy_u16,char* gz_u16, int *dsize); |
tomoya123 | 0:0a7fa0911e6c | 19 | float x(); |
tomoya123 | 0:0a7fa0911e6c | 20 | float y(); |
tomoya123 | 0:0a7fa0911e6c | 21 | float z(); |
tomoya123 | 0:0a7fa0911e6c | 22 | void x_u16(char* g_u16, int *dsize); |
tomoya123 | 0:0a7fa0911e6c | 23 | void y_u16(char* g_u16, int *dsize); |
tomoya123 | 0:0a7fa0911e6c | 24 | void z_u16(char* g_u16, int *dsize); |
tomoya123 | 0:0a7fa0911e6c | 25 | private: |
tomoya123 | 0:0a7fa0911e6c | 26 | char _cmd[2]; |
tomoya123 | 0:0a7fa0911e6c | 27 | short int _xl,_xh,_yl,_yh,_zl,_zh; |
tomoya123 | 0:0a7fa0911e6c | 28 | }; |
tomoya123 | 0:0a7fa0911e6c | 29 | #endif |