Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed PowerControl SDFileSystem
Fork of SDFilesystem by
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
Generated on Fri Jul 15 2022 08:06:17 by
1.7.2
