testprogram20190502

Dependencies:   mbed LSM6DS3 SDFileSystem

Files at this revision

API Documentation at this revision

Comitter:
TamiyaSylc
Date:
Thu May 02 11:40:06 2019 +0000
Parent:
0:d6f289df4a08
Commit message:
20190502

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r d6f289df4a08 -r 38b61cb4f021 main.cpp
--- a/main.cpp	Thu Aug 09 00:44:04 2018 +0000
+++ b/main.cpp	Thu May 02 11:40:06 2019 +0000
@@ -1,7 +1,8 @@
 #include "mbed.h"
 #include "SDFileSystem.h"
 #include "LSM6DS3.h"
- 
+
+
 //-------------------------------------------------------------------------------
 //Port Settings
 DigitalOut led1(LED1);
@@ -26,6 +27,8 @@
 //
 int main()
 {
+    float a,b,c;
+
     while(1)
     {
         led1 = 1;
@@ -52,15 +55,20 @@
                 {
                     led2 = 0;
                     wait(0.1);
-                    lsm.readGyro();
-                    fprintf(fp,"gx:%f gy:%f gz:%f\r\n",lsm.gx ,lsm.gy ,lsm.gz);
-                    lsm.readAccel();
-                    fprintf(fp,"ax:%f ay:%f az:%f\r\n",lsm.ax ,lsm.ay ,lsm.az);
-                    lsm.readTemp();
-                    fprintf(fp,"temp:%f\r\n",lsm.temperature_c );
+                    //lsm.readGyro();
+                    //fprintf(fp,"gx:%f gy:%f gz:%f\r\n",lsm.gx ,lsm.gy ,lsm.gz);
+                    a=1.1,b=1.2,c=1.3;
+                    fprintf(fp,"gx:%f gy:%f gz:%f\r\n",a ,b ,c);
+                    //lsm.readAccel();
+                    //fprintf(fp,"ax:%f ay:%f az:%f\r\n",lsm.ax ,lsm.ay ,lsm.az);
+                    a=a+1,b=b+1,c=c+1;
+                    fprintf(fp,"ax:%f ay:%f az:%f\r\n",a ,b ,c);
+                    //lsm.readTemp();
+                    //fprintf(fp,"temp:%f\r\n",lsm.temperature_c );
                     led2 = 1;
                     wait(0.3);
                 }
+                wait(3);
                 fprintf(fp,"\r\n");
                 fclose(fp);
                 free(fp);