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:
- 58:7239c2ab2b65
- Parent:
- 57:0b554f7aa9a3
- Child:
- 59:a9b21b3d9afc
--- a/main.cpp Wed Jul 01 22:21:02 2015 +0000 +++ b/main.cpp Thu Jul 02 03:42:39 2015 +0000 @@ -115,7 +115,7 @@ char * RTCtime; */ -/* + void check_stop() // this checks if it's time to stop and shutdown { RTC.get_time(); @@ -125,7 +125,7 @@ stop.detach(); stop.attach(&check_stop, 5); // checks stop time every 5 seconds } -*/ + void log_data() { @@ -230,20 +230,20 @@ pc.printf("!Reset the time!\r\n"); goto fix_error; } - /* RTC.get_time(); + RTC.get_time(); if(RTC.our_time > stop_time){ //Don't proceed if it's already time to stop RGB_LED.set_led(1,0,0); // error code/color pc.printf("!Fix the stop time!\r\n"); goto fix_error; } - */ + RGB_LED.set_led(1,1,0); while(RTC.our_time < start_time) { // this while waits for the start time by looping until the start time RTC.get_time(); // serial print a count down?? } - // stop.attach(&check_stop, 60); // check if we should shut down every 5 seconds, starting 60s after the start. + stop.attach(&check_stop, 60); // check if we should shut down every 5 seconds, starting 60s after the start. if(volflowSet==1.0){