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:
70:81f04e69e08a
Parent:
69:7a99d97c334e
Child:
71:78edbceff4fc
--- a/main.cpp	Sat Aug 15 17:30:20 2015 +0000
+++ b/main.cpp	Sun Aug 16 17:10:37 2015 +0000
@@ -58,6 +58,8 @@
 
 
 
+
+
 float press;
 float temp;
 float rh;
@@ -118,13 +120,22 @@
         pbKill = 0; // this is were we shut everything down
     }
     stop.detach();
-    stop.attach(&check_stop, 5);    // checks stop time every 5 seconds
+    stop.attach(&check_stop, 9);    
 }
 
 
 void log_data()
 {
+    logg.detach();
+    logg.attach(&log_data, logInerval);
     RTC.get_time();
+    secondsD = RTC.seconds;
+    while(fmod(secondsD,logInerval)!=0){
+        RTC.get_time();
+        secondsD = RTC.seconds;
+        }
+    
+    
     omronReading = ads.readADC_SingleEnded(0, 0xC583); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
     omronVolt = (omronReading*4.096)/(32768*2);
 
@@ -197,9 +208,8 @@
     //Unmount the filesystem
     //sd.unmount();
 
-    wait(1);
-    logg.detach();
-    logg.attach(&log_data, 10);
+    //wait(1.2);
+    
 }
 
 int main()