Xbee Uplink

Dependencies:   mbed PowerControl SDFileSystem

Fork of HeptaXbee_Uplink by 智也 大野

hepta_sat/HeptaAccel.h

Committer:
MEXT1
Date:
2016-12-14
Revision:
3:15a7f7fa174a
Parent:
0:9a52d95a79f7

File content as of revision 3:15a7f7fa174a:

#ifndef MBED_HEPTAACCEL_H
#define MBED_HEPTAACCEL_H
#include "mbed.h"
#define UINT14_MAX      16383

//3axis Accel Sensor MMA8451Q
class HeptaAccel{
public:
    I2C accel;
    int addr;
    HeptaAccel(
        PinName sda,// Accel I2C port
        PinName scl,// Accel I2C port
        int aaddr                   
    );
    void setup();
    void sensing(float *ax,float *ay,float *az);
    void sensing_u16(char* ax_u16,char* ay_u16,char* az_u16, int *dsize);
    float x();
    float y();
    float z();
    void x_u16(char* a_u16, int *dsize);
    void y_u16(char* a_u16, int *dsize);
    void z_u16(char* a_u16, int *dsize);
private:
    char _cmd[2];
    short int _xmsb,_xlsb,_ymsb,_ylsb,_zmsb,_zlsb;
};

#endif