HRM with LPC1768, calculating the BPM and communicating with bluetooth
Revision 1:44f270926c4a, committed 2022-07-31
- Comitter:
- 2675375x
- Date:
- Sun Jul 31 20:09:30 2022 +0000
- Parent:
- 0:312e7105da24
- Commit message:
- HRM with LPC1768, calculating the BPM and communicating with bluetooth
Changed in this revision
| HRM.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/HRM.h Sun Jul 31 19:57:30 2022 +0000
+++ b/HRM.h Sun Jul 31 20:09:30 2022 +0000
@@ -36,37 +36,4 @@
}
return maxrate;
}
-
-float Threshold(){
- float adc_value;
- float samples[2048];
- float *p =samples;
- float threshold ;
-
- for(int i = 0; i<2048;i++){
- adc_value = sensor.read()* 3.3;
- *(p+i) = adc_value ;
- wait_ms(1);
- }
-
- float max = Get_Array_Max(samples,2048);
- float min = Get_Array_Min(samples,2048);
- threshold = (max - min)*0.7+ min;
- return threshold;
-}
-
-float Maxrate(){
- float adc_value;
- float samples[2048];
- float *p =samples;
- float maxrate ;
-
- for(int i = 0; i<2048;i++){
- adc_value = sensor.read()* 3.3;
- *(p+i) = adc_value ;
- wait_ms(1);
- }
-
- maxrate = Get_MaxRate(samples,2048);
- return maxrate;
-}
+
\ No newline at end of file