Data logger with SD card storage and RTC

Dependencies:   SDFileSystem SoftSerial ds3231 mbed

Files at this revision

API Documentation at this revision

Comitter:
dexterg
Date:
Mon Mar 07 21:01:21 2016 +0000
Parent:
11:ce12856c2a51
Commit message:
String format changed

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ce12856c2a51 -r aea46fad46b4 main.cpp
--- a/main.cpp	Mon Mar 07 20:24:00 2016 +0000
+++ b/main.cpp	Mon Mar 07 21:01:21 2016 +0000
@@ -49,12 +49,12 @@
     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,%f,%f,%f,%f,%f\r\n",tbuff,lifeTime,oTwo,peak,trough,ancil);
+        fprintf(fp, "%s, %f,%f,%f,%f,%f \r\n",tbuff,lifeTime,oTwo,peak,trough,ancil);
     }
     fclose(fp);
     fpga.printf("lifetime: %f  o2: %f  peak: %f  trough: %f  ancil: %f ",lifeTime,oTwo,peak,trough,ancil);
@@ -219,8 +219,8 @@
 {
     //Comment below to test without RTC and SD
     externalTrig=0;
-    button.mode(PullUp);
-    button.fall(&bPush);
+    //button.mode(PullUp);
+    //button.fall(&bPush);
     button2.mode(PullUp);
     button2.fall(&bPush2);