Cellular building monitoring / Mbed 2 deprecated finalv3

Dependencies:   ARCH_GPRS_V2_HW Blinker GPRSInterface HTTPClient_GPRS RTC_WorkingLibrary SDFileSystem USBDevice mbed

Fork of finalv2 by Cellular building monitoring

Files at this revision

API Documentation at this revision

Comitter:
mbotkinl
Date:
Wed May 06 13:12:17 2015 +0000
Parent:
3:8d414873535d
Child:
5:96d91bbd6c14
Commit message:
data writes to appropriate csv

Changed in this revision

finalCodev3.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/finalCodev3.cpp	Wed May 06 13:06:59 2015 +0000
+++ b/finalCodev3.cpp	Wed May 06 13:12:17 2015 +0000
@@ -249,7 +249,9 @@
     sprintf(timestamp,"20%.2d-%.2d-%.2d %.2d:%.2d:%.2d", year, month, date, hours, minute, sec); //create time stamp
     
     mkdir("/sd", 0777);
-    FILE *fp = fopen("/sd/node1.csv","a");
+    //FILE *fp = fopen("/sd/node1.csv","a");
+    FILE *fp = fopen(filename,"a");
+
     if (fp == NULL) {
         blueLED.blink(10); //no sd Card blink Blue 10 times
     } else {
@@ -267,7 +269,9 @@
     sprintf(timestamp,"20%.2d-%.2d-%.2d %.2d:%.2d:%.2d", year, month, date, hours, minute, sec); //create timestamp
     
     mkdir("/sd", 0777);
-    FILE *fp = fopen("/sd/node1.csv","a");
+    //FILE *fp = fopen("/sd/node1.csv","a");
+    FILE *fp = fopen(filename,"a");
+
     if (fp == NULL) {
         blueLED.blink(10); //no sd Card blink blue 10 times
     } else {
@@ -285,7 +289,8 @@
     sprintf(timestamp,"20%.2d-%.2d-%.2d %.2d:%.2d:%.2d", year, month, date, hours, minute, sec); //create timestamp
     
     mkdir("/sd", 0777);
-    FILE *fp = fopen("/sd/node1.csv","a");
+    //FILE *fp = fopen("/sd/node1.csv","a");
+    FILE *fp = fopen(filename,"a");
     if (fp == NULL) {
         blueLED.blink(10); //no sd card blink blue 10 times
     } else {