vxcv

Dependencies:   ADXL362 mbed

Files at this revision

API Documentation at this revision

Comitter:
jbillingham
Date:
Fri Oct 20 13:15:54 2017 +0000
Commit message:
ifsdiufh

Changed in this revision

ADXL362.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r ea58344db986 ADXL362.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ADXL362.lib	Fri Oct 20 13:15:54 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/rmcwilliam101/code/ADXL362/#d9853774f233
diff -r 000000000000 -r ea58344db986 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 20 13:15:54 2017 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "stdio.h"
+#include "math.h"
+#include "ADXL362.h"
+
+Serial pc(USBTX, USBRX);
+ADXL362 adxl362(p11, p12, p13, p10);
+
+int main()
+{
+    adxl362.init_spi();
+    adxl362.init_adxl362();
+    wait(0.1);
+    
+    int8_t xdata, ydata, zdata;
+    
+    for(int i=0; i<50; i++)
+    {
+        adxl362.ACC_GetXYZ8(&xdata,&ydata,&zdata);
+            
+        pc.printf("%+04d\n", xdata);
+        pc.printf("%+04d\n", ydata);
+        pc.printf("%+04d\n", zdata);
+        
+        wait(0.1);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r ea58344db986 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Oct 20 13:15:54 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b484a57bc302
\ No newline at end of file