Final project 4180 Spring 2017 Heart Rate detection interfaced with bluetooth and MATLAB for signal processing. By: Prashanth Collapancheri and Venu Ganti

Dependencies:   PulseSensor mbed

Revision:
0:d17435173db6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 01 02:49:08 2017 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+ 
+AnalogIn pulseIn(p20);
+Serial pc(USBTX,USBRX);
+Serial bluemod(p9,p10);
+float pulses = 0.0;
+
+int main() {
+    char buffer[128];
+ 
+    while(1) {
+     pulses = pulseIn.read();  
+       printf("%0.4f\n", pulses);
+        if(pc.readable()){
+            if(bluemod.writeable()){
+              bluemod.printf("%c",pc.getc());
+            }  
+        }
+    wait_ms(5);
+    }
+}
+