Data logger with SD card storage and RTC

Dependencies:   SDFileSystem SoftSerial ds3231 mbed

Revision:
11:ce12856c2a51
Parent:
10:576161b68706
Child:
12:aea46fad46b4
--- a/main.cpp	Sun Feb 21 20:34:43 2016 +0000
+++ b/main.cpp	Mon Mar 07 20:24:00 2016 +0000
@@ -42,7 +42,7 @@
 char minStr[2+1];
 char secStr[2+1];
 
-char tbuff[32];
+char tbuff[200];
 char pbuff[250];
 void bPush()
 {
@@ -273,13 +273,14 @@
             //fpga.printf("%s",pbuff);
             time_t epoch_time;
             epoch_time = rtc.get_epoch();
-            strftime(tbuff, 32, "%Y-%m-%d %H:%M:%S %Z", localtime(&epoch_time));
+            
+            strftime(tbuff, 32, "%Y %m %d %H:%M:%S", localtime(&epoch_time));
             FILE *fp  = fopen("/sd/d.txt", "a");
             if(fp == NULL) {
             } else {
-                fprintf(fp, "%s,%s\r\n",tbuff,pbuff);
+                fprintf(fp, "%s, %s \r\n",tbuff, pbuff);
             }
-            serial_t0.printf("%s,%s\r\n",tbuff,pbuff);
+            serial_t0.printf("%s, %s \r\n",tbuff,pbuff);
             fclose(fp);
             newData=0;
         }