0% found this document useful (0 votes)
16 views2 pages

Patient Monitoring System Program

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Patient Monitoring System Program

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#include <LiquidCrystal.

h>
#include <TimerOne.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

int val;
int tempPin = A0;// temperature Sensor Pin
int HBSensor = 4;// Sensor Pin
int HBCount = 0;
int HBCheck = 0;
int TimeinSec = 0;
int HBperMin = 0;
int HBStart = 2;
int HBStartCheck = 0;

void setup() {
// put your setup code here, to run once:
[Link](20, 4);
pinMode(HBSensor, INPUT);
pinMode(HBStart, INPUT_PULLUP);
[Link](800000);
[Link]( timerIsr );
[Link]();
[Link](0,0);
[Link]("Current HB : ");
[Link](0,1);
[Link]("Time in Sec : ");
[Link](0,2);
[Link]("HB per Min : 0.0");
[Link](0,3);
[Link]("Body Temp : ");

void loop() {

if(digitalRead(HBStart) == LOW){
//[Link](0,3);
//[Link]("HB Counting ..");
HBStartCheck = 1;}
if(HBStartCheck == 1)
{
if((digitalRead(HBSensor) == HIGH) && (HBCheck == 0))
{
HBCount = HBCount + 1;
HBCheck = 1;
[Link](14,0);
[Link](HBCount);
[Link](" ");
}
if((digitalRead(HBSensor) == LOW) && (HBCheck == 1))
{
HBCheck = 0;
}
if(TimeinSec == 10)
{
HBperMin = HBCount * 6;
HBStartCheck = 0;
[Link](14,2);
[Link](HBperMin);
[Link](" ");
//[Link](0,3);
//[Link]("Press Button again.");
HBCount = 0;
TimeinSec = 0;
}
}

val = analogRead(tempPin);
float mv = (val/1024.0)*5000;
float cel = mv/10;
[Link](14,3);
[Link](cel);
[Link](" ");
delay(100);

void timerIsr()
{
if(HBStartCheck == 1)
{
TimeinSec = TimeinSec + 1;
[Link](14,1);
[Link](TimeinSec);
[Link](" ");
}
}

You might also like