Hepta_template_program

Dependencies:   mbed PowerControl SDFileSystem

Fork of Hepta_UplinkData by HEPTA-Sat Hands-On

Committer:
tomoya123
Date:
Tue Dec 13 09:47:15 2016 +0000
Revision:
1:2a3dc618aef7
Parent:
0:b96079b7d167
Xbee DataUplink

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tomoya123 0:b96079b7d167 1 #ifndef MBED_HEPTAACCEL_H
tomoya123 0:b96079b7d167 2 #define MBED_HEPTAACCEL_H
tomoya123 0:b96079b7d167 3 #include "mbed.h"
tomoya123 0:b96079b7d167 4 #define UINT14_MAX 16383
tomoya123 0:b96079b7d167 5
tomoya123 0:b96079b7d167 6 //3axis Accel Sensor MMA8451Q
tomoya123 0:b96079b7d167 7 class HeptaAccel{
tomoya123 0:b96079b7d167 8 public:
tomoya123 0:b96079b7d167 9 I2C accel;
tomoya123 0:b96079b7d167 10 int addr;
tomoya123 0:b96079b7d167 11 HeptaAccel(
tomoya123 0:b96079b7d167 12 PinName sda,// Accel I2C port
tomoya123 0:b96079b7d167 13 PinName scl,// Accel I2C port
tomoya123 0:b96079b7d167 14 int aaddr
tomoya123 0:b96079b7d167 15 );
tomoya123 0:b96079b7d167 16 void setup();
tomoya123 0:b96079b7d167 17 void sensing(float *ax,float *ay,float *az);
tomoya123 1:2a3dc618aef7 18 void sensing_u16(char* ax_u16,char* ay_u16,char* az_u16);
tomoya123 0:b96079b7d167 19 float x();
tomoya123 0:b96079b7d167 20 float y();
tomoya123 0:b96079b7d167 21 float z();
tomoya123 0:b96079b7d167 22 void x_u16(char* a_u16, int *dsize);
tomoya123 0:b96079b7d167 23 void y_u16(char* a_u16, int *dsize);
tomoya123 0:b96079b7d167 24 void z_u16(char* a_u16, int *dsize);
tomoya123 0:b96079b7d167 25 private:
tomoya123 0:b96079b7d167 26 char _cmd[2];
tomoya123 0:b96079b7d167 27 short int _xmsb,_xlsb,_ymsb,_ylsb,_zmsb,_zlsb;
tomoya123 0:b96079b7d167 28 };
tomoya123 0:b96079b7d167 29
tomoya123 0:b96079b7d167 30 #endif