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
Diff: main.cpp
- Revision:
- 97:c596f8ed4562
- Parent:
- 96:03106adb45c9
- Child:
- 98:d70ff5a0b2e6
--- a/main.cpp Thu Dec 17 01:05:31 2015 +0000 +++ b/main.cpp Thu Dec 17 05:30:38 2015 +0000 @@ -23,7 +23,8 @@ -uint8_t startAndEndTime[12] = {0,}; +uint8_t startAndEndTime[12] = {0,}; +uint8_t logIntervalReadOut[1] = {0,}; const static char DEVICE_NAME[] = "UPAS"; //Will hold the actual name of the whichever UPAS is being connected to static const uint16_t uuid16_list[] = {UPAS_Service::UPAS_SERVICE_UUID}; //Currently a custom 16-bit representation of 128-bit UUID BLEDevice ble; @@ -138,7 +139,7 @@ if(runData == 10){ RunReady = 10; - RGB_LED.set_led(1,2,3); + }else{ RunReady = 2; } @@ -163,6 +164,7 @@ } stop.detach(); stop.attach(&check_stop, 9); + } @@ -326,6 +328,8 @@ } calibrations.initialize(serial_num); blower=1; + E2PROM.read(0x00014,logIntervalReadOut,1); + logInerval = logIntervalReadOut[0]; // while(!RTC.compare(startAndEndTime[6], startAndEndTime[7], startAndEndTime[8], startAndEndTime[9], startAndEndTime[10], startAndEndTime[11])) { //Waits for end time // wait(0.5); @@ -347,7 +351,7 @@ RunReady = 0; // Menu.save_menu(E2PROM, logInerval, refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, RunReady, serial_num); //Save all data to the EEPROM - RGB_LED.set_led(1,1,0); + //RGB_LED.set_led(1,1,0); calibrations.initialize(serial_num); @@ -384,6 +388,7 @@ DigPot.writeRegister(digital_pot_setpoint); wait(1); blower = 1; + //Menu.save_menu(E2PROM, logInerval, refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, RunReady, serial_num); //Save all data to the EEPROM