Using an ADXL335 acelerometer, it returns x, y and z data as m/s2.

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
lim14373
Date:
Tue Sep 05 03:51:21 2017 +0000
Parent:
4:ac612ef603cd
Commit message:
Entregable

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ac612ef603cd -r 6134cd976b40 main.cpp
--- a/main.cpp	Tue Sep 05 03:49:39 2017 +0000
+++ b/main.cpp	Tue Sep 05 03:51:21 2017 +0000
@@ -29,6 +29,6 @@
         x = (dataX - 0.495) * 98.07;
         y = (dataY - 0.495) * 98.07;
         z = (dataZ - 0.495) * 98.07;
-        pc.printf("i,%f,%f,%f\n",x,y,z); 
+        serial.printf("i,%f,%f,%f\n",x,y,z); 
     }   
 }