Final1x

Dependencies:   GYRO_DISCO_L476VG BSP_DISCO_L476VG COMPASS_DISCO_L476VG

Files at this revision

API Documentation at this revision

Comitter:
gr91
Date:
Tue May 17 15:54:02 2022 +0000
Parent:
7:763b230d3b66
Commit message:
vv

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
diff -r 763b230d3b66 -r b0b8c9ed333e main.cpp
--- a/main.cpp	Sat Feb 27 06:55:41 2021 +0000
+++ b/main.cpp	Tue May 17 15:54:02 2022 +0000
@@ -10,7 +10,7 @@
 //
 GYRO_DISCO_L476VG gyro;
 COMPASS_DISCO_L476VG compass;
-Serial pc(SERIAL_TX, SERIAL_RX,115200);
+UnbufferedSerial pc(USBTX,USBRX,115200);
 Ticker ticker;
 DigitalOut led1(LED1);
 volatile bool flag=0;
@@ -71,8 +71,8 @@
     double AccF[2];
     double Gyr[2];
     double GyrF[2];
-    wait(1);
-    pc.printf("Super Inclinometre \n");
+    wait_us(1000000);
+ //   pc.printf("Super Inclinometre \n");
     coef_filtre_PB(1,FC,TE,coef_acc);   // H0 f0 Te
     coef_filtre_PB(1/(2*3.1415926*FC),FC,TE,coef_gyr);   // H0 f0 Te
     //pc.printf("a= %f   b=%f \n\r",coef_acc[0],coef_acc[1]);
@@ -97,7 +97,9 @@
                 led1 = !led1;
                 // angle accelero, angne gyro, angle acc. filtré, gyro filtré, angle fusion
                 //pc.printf("$%f %f %f %f %f;\n",psia,psig,AccF[0],GyrF[0],fusion);  
-                pc.printf("$%f %f %f;\n",AccF[0],GyrF[0],fusion);  
+                char ligne[50];
+                sprintf(ligne,"$%f %f %f;\n",AccF[0],GyrF[0],fusion); 
+                pc.write(ligne,strlen(ligne)); 
                 
             }
             cpt++;
diff -r 763b230d3b66 -r b0b8c9ed333e mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Tue May 17 15:54:02 2022 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#2eb06e76208588afc6cb7580a8dd64c5429a10ce
\ No newline at end of file
diff -r 763b230d3b66 -r b0b8c9ed333e mbed.bld
--- a/mbed.bld	Sat Feb 27 06:55:41 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file