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 HeptaBattery_SDFilesystem_Q by
Diff: hepta_sat/HeptaAccel.h
- Revision:
- 0:9eb94b338772
diff -r 000000000000 -r 9eb94b338772 hepta_sat/HeptaAccel.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hepta_sat/HeptaAccel.h Fri Dec 09 04:53:49 2016 +0000
@@ -0,0 +1,30 @@
+#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
\ No newline at end of file
