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:
93:b53a9a7cb8f1
Parent:
92:bb36c4bedb8e
Child:
94:c57720890e76
--- a/main.cpp	Tue Oct 06 03:14:40 2015 +0000
+++ b/main.cpp	Fri Oct 09 21:49:18 2015 +0000
@@ -146,11 +146,11 @@
 void log_data()
 {
     logg.detach();
-    if(logInerval < 1){
+   // if(logInerval < 1){
         logg.attach(&log_data, logInerval);     // reading and logging data must take significintly less than 0.5s. This can be increased.
-    }else{
-        logg.attach(&log_data, logInerval-0.5); // reading and logging data must take significintly less than 0.5s. This can be increased.
-    }
+   // }else{
+   //     logg.attach(&log_data, logInerval-0.5); // reading and logging data must take significintly less than 0.5s. This can be increased.
+   // }
     RTC.get_time();
     //*****************************************//
     //RTC.get_time(); //debug
@@ -229,7 +229,8 @@
     FILE *fp = fopen(filename, "a");
     fprintf(fp, "%02d,%02d,%02d,%02d,%02d,%02d,%1.3f,%1.3f,%2.2f,%4.2f,%2.1f,%1.3f,%1.3f,%5.1f,%1.1f,%1.1f,%1.1f,%1.1f,%d,%d,%d,%d,%d,%d,%d,%d,%d,%1.3f,%1.3f,%f\r\n",RTC.year, RTC.month,RTC.date,RTC.hour,RTC.minutes,RTC.seconds,omronVolt,massflow,temp,press,rh,atmoRho,volflow,sampledVol,accel_x,accel_y,accel_z,accel_comp,uv,omronReading, vInReading, vBlowerReading, omronDiff,gasG.getAmps(), gasG.getVolts(), gasG.getCharge(),digital_pot_set, deltaMflow, deltaVflow, compass);
     fclose(fp);
-    wait_ms(5);
+    //wait_ms(5);
+    
 }
 
 int main()
@@ -529,8 +530,9 @@
     //---------------------------------------------------------------------------------------------//
     // Main Control Loop
 
+
     logg.attach(&log_data, logInerval); // uses callbacks or block Interrupts for anything that uses i2c
-    while(1) {
+    /*while(1) {
         //__disable_irq();  // Disable Interrupts
         //RTC.get_time();
         //__enable_irq();   // Enable Interrupts
@@ -539,7 +541,7 @@
         //log_data();
         //}
     }
+    */
 
 }
 
-