PRO2_Team 1_collected code with ticker_not working yet

Dependencies:   SHTx mbed

Fork of PRO2_samlet_kode by Software hold - Team 1 - PRO2 2017

Revision:
1:135bd458e39e
Child:
5:b366110c0d59
diff -r 21e9cc38dd31 -r 135bd458e39e logging.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logging.cpp	Thu May 18 22:34:57 2017 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+void logging ()
+{
+    int i,t;
+    FILE *fp;
+
+
+    if ((fp = fopen("Logger_data", "a+")) == NULL) { //filnavn logger_data
+        fprintf (stdout, "Can't open \"Logger_data\" file.\n");
+        exit(EXIT_FAILURE);//sikre at filen kan åbnes
+    }
+
+    fprintf(fp,"\n\nlogger_data kl.00.00 D.dd-mm-yyyy\n"); //skriver i fil
+    fprintf(fp,"Temperatur:x\n");//variable fra temp indsættes
+    fprintf(fp,"Co2:x\n");//variable fra Co2 indsættes
+    fprintf(fp,"H2o:x"); //variable fra H2o indsættes
+
+
+    fprintf(fp,"Logger_data update complete!"); // 
+    if (fclose(fp) != 0)
+        fprintf(stderr, "Error closing file\n"); //lukker fil
+    
+    //sætter i og t = 0
+    i=0;
+    t=0;
+ 
+    return; //går over i hibernation
+}
\ No newline at end of file