智也 大野 / Mbed 2 deprecated SDFilesystem

Dependencies:   mbed PowerControl SDFileSystem

Fork of SDFilesystem by 智也 大野

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HeptaAccel.h Source File

HeptaAccel.h

00001 #ifndef MBED_HEPTAACCEL_H
00002 #define MBED_HEPTAACCEL_H
00003 #include "mbed.h"
00004 #define UINT14_MAX      16383
00005 
00006 //3axis Accel Sensor MMA8451Q
00007 class HeptaAccel{
00008 public:
00009     I2C accel;
00010     int addr;
00011     HeptaAccel(
00012         PinName sda,// Accel I2C port
00013         PinName scl,// Accel I2C port
00014         int aaddr                   
00015     );
00016     void setup();
00017     void sensing(float *ax,float *ay,float *az);
00018     void sensing_u16(char* ax_u16,char* ay_u16,char* az_u16, int *dsize);
00019     float x();
00020     float y();
00021     float z();
00022     void x_u16(char* a_u16, int *dsize);
00023     void y_u16(char* a_u16, int *dsize);
00024     void z_u16(char* a_u16, int *dsize);
00025 private:
00026     char _cmd[2];
00027     short int _xmsb,_xlsb,_ymsb,_ylsb,_zmsb,_zlsb;
00028 };
00029 
00030 #endif