code of robot bike

Dependencies:   SDFileSystem mbed

Fork of Robot_Bicycle by Chris LU

Revision:
8:79ca11e0129d
Parent:
7:b8413464d111
Child:
9:159bad8bae03
--- a/main.cpp	Sun Jul 10 09:41:33 2016 +0000
+++ b/main.cpp	Mon Jul 18 03:31:39 2016 +0000
@@ -108,8 +108,8 @@
     timer1.attach_us(&timer1_interrupt, 4000);//4.0ms interrupt period (250 Hz)
     timer2.attach_us(&timer2_interrupt, 4098);//4.098ms interrupt period (244 Hz)
     
-    mkdir("/sd/20160710", 0777);
-    dataPtr = fopen("/sd/20160710/data.dat", "w");
+    mkdir("/sd/20160718", 0777);
+    dataPtr = fopen("/sd/20160718/data.dat", "w");
     if(dataPtr == NULL) {
         error("Could not open file for write\r\n");
         interrupt = 1;
@@ -133,7 +133,7 @@
                           ready_to_go();
                           pc.printf("go\r\n");
                           pedal_state = 1; sys_state = L_PD; gamma_ref = 0.0;
-                          dataPtr = fopen("/sd/20160710/data.dat", "a");
+                          dataPtr = fopen("/sd/20160718/data.dat", "a");
                           if(dataPtr == NULL) {
                             error("Could not open file for write\r\n");
                             interrupt = 1;