Using an ADXL335 acelerometer, it returns x, y and z data as m/s2.
Fork of HelloWorld by
Diff: main.cpp
- Revision:
- 5:6134cd976b40
- Parent:
- 4:ac612ef603cd
--- 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); } }