HEPTA-Sat Training 2019
/
Lab4-02_Detect_acceleration_x-axis
Lab4
Diff: main.cpp
- Revision:
- 25:864883d3fe57
- Parent:
- 24:ca9f33c96136
--- a/main.cpp Tue Aug 27 01:00:32 2019 +0000 +++ b/main.cpp Thu Aug 29 02:44:01 2019 +0000 @@ -34,7 +34,7 @@ xl = i2c.read(0); i2c.stop(); double acc_ax = short((xh<<8) | (xl)); - double AX = (acc_ax)*2/32764*9.81; + double AX = (acc_ax)*2/32768*9.81; pc.printf("AX = %f\r\n",AX); wait(0.5); }