int input = 0; // output of hardware ckt to analog pin 0
volatile int output;
volatile int BPM; // no. of beat per minute
volatile int del_t = 600; // time interval between beats
volatile boolean pp = false;
volatile boolean h_beat = false; // true when there is a heart beat.
void setup(){
Serial.begin(115200);
interruptSetup(); // interrupts every 2 mili second
}
void loop(){
send_serial_port('O', output);
if (h_beat == true){ // if a hertbeat is found
send_serial_port('B',BPM);
send_serial_port('D',del_t);
h_beat = false;
}
delay(20);
}
void send_serial_port(char letter, int value ){
Serial.print(letter);
Serial.println(value);
}
In this project, we measured human heart rate using IR emitter and detector, Arduino board and some other low cost component. We observed heart rate of some individuals with IR emitter and detector, Arduino Board and Processing 2.0 software, and attached the result in the report. We compared the cost of heart rate monitor that uses IR emitter and detector, and the one that uses pulse sensor.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.