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
Revision 109:33d7fc6c1b9b, committed 2016-02-12
- Comitter:
- jelord
- Date:
- Fri Feb 12 00:52:10 2016 +0000
- Parent:
- 108:2cf8d5159fc6
- Child:
- 110:67980ebdebf6
- Commit message:
- serial number fixed
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Feb 11 17:58:15 2016 +0000 +++ b/main.cpp Fri Feb 12 00:52:10 2016 +0000 @@ -329,13 +329,13 @@ //Code/conditional set up to prevent bad values in the EEPROM. Does not set serial number currently uint8_t eepromFlag[1] = {0,}; E2PROM.read(0x00071,eepromFlag,1); - if(eepromFlag[0]!= 0x0A){ + if(eepromFlag[0]!= 0x0B){ E2PROM.write(0x00015, sampleTimePassValues, 12); E2PROM.write(0x00001, subjectLabelOriginal,8); E2PROM.write(0x00014,dataLogOriginal,1); E2PROM.write(0x00010,flowRateOriginal,4); - eepromFlag[0] = 0x0A; + eepromFlag[0] = 0x0B; E2PROM.write(0x00071,eepromFlag,1); } @@ -490,7 +490,8 @@ E2PROM.read(0x00034, flowRateOriginal,2); serial_num = ((uint16_t)flowRateOriginal[1] << 8) | flowRateOriginal[0]; //---------------------------------------------- - calibrations.initialize(6); + calibrations.initialize(serial_num); + pc.printf("%f\n",calibrations.MF4); //---------------------------------------------- wait(1); blower=1;