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

main.cpp

Committer:
vganti6
Date:
2017-05-01
Revision:
0:d17435173db6

File content as of revision 0:d17435173db6:

#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);
    }
}