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:
11:2297d364af61
Parent:
10:f9cb61b29340
Child:
12:8c00a7f5d483
--- a/main.cpp	Wed May 20 18:19:30 2015 +0000
+++ b/main.cpp	Wed May 20 22:21:51 2015 +0000
@@ -52,6 +52,7 @@
 uint8_t Date    = 0;//Date
 uint8_t Month   = 0;//Month
 uint8_t Year    = 0;//Year
+double secondsD = 0;
 
 void get_time()
 {
@@ -117,6 +118,10 @@
      
     get_time(); 
     
+    secondsD = Seconds;
+    
+    if(fmod(secondsD,10)==0){
+    
     movementsensor.getACCEL();
     movementsensor.getCOMPASS();
     accel_x = movementsensor.AccelData.x;
@@ -142,10 +147,11 @@
     fclose(fp);
     //Unmount the filesystem
     sd.unmount();
+    DigPot.writeRegister(digital_pot_setpoint);
    
-    wait(10);
+    wait(1);
    
-    DigPot.writeRegister(digital_pot_setpoint);
+    }
    
     
     }