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:
18:f530dfdc0c05
Parent:
17:1baf7cab694e
Child:
19:addd6c99c970
--- a/main.cpp	Sat May 30 01:25:47 2015 +0000
+++ b/main.cpp	Sat May 30 03:50:36 2015 +0000
@@ -42,7 +42,7 @@
 int vBlowerReading;
 int omronDiff;
 int digital_pot_setpoint = 0x07; //min = 0x7F, max = 0x00
-char filename[] = "/sd/UPAS000000000000LOG.txt";
+char filename[] = "/sd/UPASLOG000000000000.txt";
 
 TwoWire Wire = TwoWire(NRF_TWI0);    
 SDFileSystem sd(SPIS_PSELMOSI, SPIS_PSELMISO, SPIS_PSELSCK, SPIS_PSELSS, "sd"); // I believe this matches Todd's pinout, let me know if this doesn't work. (p12, p13, p15, p14)
@@ -148,7 +148,7 @@
       //Mount the filesystem
     sd.mount();
     FILE *fp = fopen(filename, "a");
-    fprintf(fp, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%2.2f,%04.2f,%2.2f,%.0f,%.0f,%.0f,%.0f,%.0f,%.0f,%d,%d,%d\r\n", Year,Month,Date,Hour,Minutes,Seconds,omronReading,vInReading, vBlowerReading, omronDiff, gasG.getAmps(), gasG.getVolts(), gasG.getCharge(), bmesensor.getTemperature(), bmesensor.getPressure(),bmesensor.getHumidity(),accel_x, accel_y, accel_z, mag_x, mag_y, mag_z,lightsensor.getUV(), lightsensor.getVIS(), lightsensor.getIR());
+    fprintf(fp, "%d,%d,%d,%d,%d,%d,%.0f,%.0f,%.0f,%.0f,%.0f,%.0f,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%2.2f,%04.2f,%2.2f\r\n", Year,Month,Date,Hour,Minutes,Seconds,bmesensor.getTemperature(), bmesensor.getPressure(),bmesensor.getHumidity(),accel_x, accel_y, accel_z, mag_x, mag_y, mag_z,lightsensor.getUV(), lightsensor.getVIS(), lightsensor.getIR(), omronReading,vInReading, vBlowerReading, omronDiff, gasG.getAmps(), gasG.getVolts(), gasG.getCharge() );
     fclose(fp);
     //Unmount the filesystem
     sd.unmount();