Changes done in ECG and BT
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of merged_code2_20sept_2017_4th_oct_2017 by
Diff: bp.cpp
- Revision:
- 5:a3ea7c82b7e1
- Parent:
- 3:9a06c2bed650
- Child:
- 8:adf2ba7e6412
diff -r 6bd81bb1790d -r a3ea7c82b7e1 bp.cpp --- a/bp.cpp Wed Mar 01 18:49:33 2017 +0000 +++ b/bp.cpp Thu Mar 30 11:34:04 2017 +0000 @@ -24,10 +24,10 @@ -int bp() { +void bp() { //------------------BP ADD------------------------------//{ -int location; // BP ADD +//int location; // BP ADD int32_t n_red_buffer_length = 1500; //data length uint32_t aun_red_buffer[1500]; //Red LED sensor data, set to 500 uint32_t red_value; @@ -38,12 +38,12 @@ float SBP, DBP, PWV, delta_t; int d = 210; -uint32_t un_min, un_max, un_prev_data, ecg_min, ecg_max ; //variables to calculate the on-board LED brightness that reflects the heartbeats - int i, j; +uint32_t un_min, un_max, ecg_min, ecg_max ; //variables to calculate the on-board LED brightness that reflects the heartbeats + //int i, j; float ecg_location, ppg_location; - int32_t n_brightness; + //int32_t n_brightness; - n_brightness=0; + // n_brightness=0; un_min=0x3FFFF; un_max=0; ecg_min = 0xFFFFFF; @@ -57,8 +57,8 @@ //uint32_t ecg_buf[1500]; //int32_t ecg_der[1500]; //int buff1[15]= {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -int32_t sample_sum; // static int32_t avg[1500]; - int32_t count = 0; int32_t fs = 500; int32_t w=0,w1=0; +//int32_t sample_sum; // static int32_t avg[1500]; + //int32_t count = 0; int32_t fs = 500; int32_t w=0,w1=0; unsigned char chk = 1; bc.baud(baud_rate); @@ -180,7 +180,7 @@ //-----------------WRITE ECG &PPG - + /* sd_open_BPfile(1); for (int w=0; w < 1000; w++) { @@ -195,7 +195,7 @@ red_value = aun_red_buffer[w]; sd_write(red_value); } -sd_close(); +sd_close();*/ //----------- FINISHED WRITING ECG & PPG TO SD CARD