Code supports writing to the SD card as well as working with the Volckens group smartphone apps for the mbed HRM1017

Dependencies:   ADS1115 BLE_API BME280 Calibration CronoDot EEPROM LSM303 MCP40D17 NCP5623BMUTBG SDFileSystem SI1145 STC3100 mbed nRF51822

Fork of UPAS_BLE_and_USB by Volckens Group Sensors

Revision:
116:5ab9d74cfb6d
Parent:
115:fb25810c1fab
--- a/main.cpp	Thu Feb 18 03:43:35 2016 +0000
+++ b/main.cpp	Thu Feb 18 03:54:42 2016 +0000
@@ -44,8 +44,8 @@
 DigitalOut          GPS_EN(p4,0);       //pin 4 is used to enable and disable the GPS, in order to recive serial communications
 Calibration         calibrations(1);     //Default serial/calibration if there are no values for the selected option
 
-//Timeout         stop;   //This is the stop call back object
-//Timeout         logg;   //This is the logging call back object
+Timeout         stop;   //This is the stop call back object
+Timeout         logg;   //This is the logging call back object
 
 
 
@@ -168,7 +168,7 @@
 
 }
 
-/*
+
 void check_stop()   // this checks if it's time to stop and shutdown
 {
     
@@ -271,7 +271,7 @@
     fclose(fp);
     
 }
-*/
+
 
 /*EEPROM ADDRESSING:
     0:Status bit-Unused
@@ -413,7 +413,7 @@
     RunReady = 0;
 
 
-    //stop.attach(&check_stop, 30);    // check if we should shut down every 30 seconds, starting 60s after the start.
+    stop.attach(&check_stop, 30);    // check if we should shut down every 30 seconds, starting 60s after the start.
 
     //Use the flow rate value stored in eeprom
     E2PROM.read(0x00010,flowRateOriginal,4);
@@ -512,9 +512,9 @@
     sampledVol = 0.0;
     RGB_LED.set_led(0,1,0);
     
-  //  logg.attach(&log_data, logInerval); // uses callbacks or block Interrupts for anything that uses i2c
+    logg.attach(&log_data, logInerval); // uses callbacks or block Interrupts for anything that uses i2c
 
-
+/*
     while(1){
         if(RTC.compare(startAndEndTime[6], startAndEndTime[7], startAndEndTime[8], startAndEndTime[9], startAndEndTime[10], startAndEndTime[11])) 
             pbKill = 0; // this is were we shut everything down
@@ -606,7 +606,7 @@
         
     }
     
-
+*/
 
 }