You are on page 1of 5

#include <LiquidCrystal.

h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);


int as1 = A5;
int as2 = A4;
int as3 = A3;
int as4 = A2;
int s1Value = 0;
int s2Value = 0;
int s3Value = 0;
int s4Value = 0;
int os1 = 0;
int os2 = 0;
int os3 = 0;
int os4 = 0;

int buzzer = 9;
void setup() {

pinMode(buzzer, OUTPUT);
digitalWrite(buzzer, HIGH);
lcd.begin(16, 2);
lcd.print("RF PATEINT MONI.");
lcd.setCursor(0, 1);

lcd.print("WITH GUI SYSTEM");


delay(1000);
lcd.clear();
lcd.print("IET DAVV ");
lcd.setCursor(0, 1);
lcd.print("INDORE");
delay(1000);
lcd.clear();
Serial.begin(9600);

void loop() {
s1Value = analogRead(as1);
s2Value = analogRead(as2);
s3Value = analogRead(as3);
s4Value = analogRead(as4);

os1 = map(s1Value, 0, 1023, 0, 255);


os2 = map(s2Value, 0, 1023, 0, 255);
os3 = map(s3Value, 0, 1023, 0, 255);
os4 = map(s4Value, 0, 1023, 0, 255);

lcd.setCursor(0, 0);
lcd.print("T=" );
os1=2*os1;
os1=((os1*9)/5)+32;
lcd.print(os1);
Serial.print("Temperature= " );
Serial.print(os1);
Serial.print("deg.Fahrenheit " );
if(os1 > 98)
{
digitalWrite(buzzer, LOW);
}
else{
digitalWrite(buzzer, HIGH);
}
delay(50);

lcd.setCursor(8, 0);
lcd.print("R= " );
lcd.print(os2);
Serial.print("Respiration Rate = " );
Serial.print(os2);

if(os2 > 80)


{
digitalWrite(buzzer, LOW);
}
else{
digitalWrite(buzzer, HIGH);
}
delay(50);

lcd.setCursor(0, 1);
lcd.print("S= " );
lcd.print(os3);
Serial.print(" Stress = " );
Serial.print(os3);

if(os3 > 10)


{
digitalWrite(buzzer, LOW);
}
else{
digitalWrite(buzzer, HIGH);
}
delay(50);

lcd.setCursor(8, 1);
lcd.print("H= " );
os4 =os4 - 20;
lcd.print(os4);
Serial.print(" Heart Rate = " );
Serial.print(os4);
Serial.print("beats/sec." );
delay(1000);
lcd.clear();
}