![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fall Detection Algorithm based on ST LSM303
Diff: main.cpp
- Revision:
- 1:474dc40b688a
- Parent:
- 0:c355c42bd6de
--- a/main.cpp Thu Aug 23 18:11:16 2018 +0000 +++ b/main.cpp Thu Aug 23 18:47:40 2018 +0000 @@ -61,10 +61,8 @@ retval=sensor.read(&aax, &aay, &aaz, &mmx, &mmy, &mmz); if (retval==1) { - printf("Success: LSM303DLHC Connected, Accel Values: %3.2f%3.2f%3.2f\n", aax, aay, aaz); - - - + printf("Success: LSM303DLHC Connected, Accel Values: %3.3f %3.3f %3.3f\n", aax, aay, aaz); + } else { printf("Failure : LSM303DLHC NOT RESPONDING................... \n"); @@ -76,7 +74,10 @@ free_fall.fall(&ff); while(1) -{ +{ +retval=sensor.read(&aax, &aay, &aaz, &mmx, &mmy, &mmz); +printf("Accel Values: %3.3f %3.3f %3.3f\n", aax, aay, aaz); +wait(5); } }