Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_IKS01A2 mbed
Fork of HelloWorld_IKS01A2 by
Revision 14:de30b189c5ec, committed 2017-02-10
- Comitter:
- vidica94
- Date:
- Fri Feb 10 18:52:39 2017 +0000
- Parent:
- 13:2e809b3e6ea9
- Child:
- 15:25999e71b22d
- Commit message:
- acquisizioni con accelerometro e giroscopio
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Feb 09 14:31:27 2017 +0000
+++ b/main.cpp Fri Feb 10 18:52:39 2017 +0000
@@ -51,20 +51,20 @@
{axes[i]=axes[i]-off[i];}
printf("LSM6DSLfine [gyro/mdps]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
k=k+1;
- //wait_ms(10);
+ wait_m(1);
// ricavo l'parziale dalla velocità angolare
for(int i=0;i<3;i++)
-{parziale[i]=(axes[i]*sens)/1000;
+{
+ parziale[i]=(axes[i]*sens)/1000;
-if (parziale[i] > 1 || parziale[i] < -1) {
- parziale[i] /= 1000;
+
+ parziale[i]/= 1000;
+ if (axes[i]>150 ||axes[i]<-150)
finale[i] += parziale[i];
- }
-
+
}
-
printf("finale [gyro/d]: %6f, %6f, %6f\r\n", finale[0], finale[1], finale[2]);//angolo
}
}
