include

const int buttonPin = 7; // the number of the pushbutton pin

const int buttonPin1 = 8;
const int ledPin = 13; // the number of the LED pin
const int ledPin1 = 6;
// variables will change:
int buttonState = 0;
int buttonState1 = 0;

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

void setup() {
pinMode(buttonPin, INPUT);
pinMode(buttonPin1, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(ledPin1, OUTPUT);
// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print (“BP Testing”);

}

void loop() {

buttonState = digitalRead(buttonPin);

buttonState1 = digitalRead(buttonPin1);

if (buttonState == HIGH)
{
lcd.setCursor(0, 0); // top left
lcd.print (“checking”);
delay(200);

    ctrr++;

  delay(100);

  if (buttonState1 == HIGH)
  {
   moji();
  }

}

}
void moji()
{
ctrr=ctrr+60;
delay(500);
lcd.setCursor(1, 1); // top left
lcd.print (ctrr);
if (ctrr>100)
{
digitalWrite(ledPin,HIGH);
digitalWrite(ledPin1,LOW);
}
if (ctrr<80)
{
digitalWrite(ledPin1,HIGH);
digitalWrite(ledPin,LOW);
}

delay(5000);
while(1);
}

Leave a Reply

Your email address will not be published. Required fields are marked *