-data logging revision

Dependencies:   FastPWM

Revision:
2:92c25cb669f4
Parent:
1:25a2b47ca291
--- a/main.cpp	Thu Aug 05 08:27:51 2021 +0000
+++ b/main.cpp	Tue Aug 24 08:51:13 2021 +0000
@@ -24,6 +24,8 @@
 float Ts=.0002f;                    // sampling time
 void pressed(void);
 void released(void); 
+
+
 //------------- DEFINE FILTERS ----------------
 // missing
 //------------- Define In/Out -----------------
@@ -90,12 +92,13 @@
     glob_ti.start();
     glob_ti.reset();
     loop.init_controllers();
-    uart_com.start_uart();
+    //uart_com.start_uart();        // communication with MATLAB
+    printf("hello world \n");
     loop.start_loop();
     i_des1.write(i2u(0));
     i_des2.write(i2u(0));
     ThisThread::sleep_for(200);
-    uart_com.send_text((char *)"Start Mirroractuator 1.1");
+    //uart_com.send_text((char *)"Start Mirroractuator 1.1");   // communciation with MATLAB
    /* p1.initialize(300,10,A,0,0,0);
     p2.initialize(300,10,-A,0,0,A);*/
     laser_on = 0;
@@ -120,4 +123,19 @@
         {
         ThisThread::sleep_for(200);
         }
+    //  *** create CSV file of data
+ 
+        /*FILE *f = fopen ("test.csv", "a");
+
+        // inform user
+        if (!f) {
+            printf ("failed\n");
+        } else {
+            printf ("success\n");
+        }
+
+        fprintf (f, " test\n");
+        fclose (f);
+        return 0;*/ 
+     
 }   // END OF main