Skip to main content

blood pressure using arduino code with lcd display


// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

int buttonState = 0;         // variable for reading the pushbutton status

// These constants won't change.  They're used to give names
// to the pins used:
const int analogInPine = A0;  // Analog input pin that the potentiometer is attached to
const int analogInPinb = A1;  // Analog input pin that the potentiometer is attached to

int sensorPin = A5;    // select the input pin for the potentiometer
int sensorValue = 0;  // variable to store the value coming from the sensor
int count=0,fl;
unsigned long time1=0;  // store the initial time
unsigned long time2;    // store the current time
  int count1;

int sensorValue1 = 0;        // value read from the pot

void setup() {
     
  lcd.setCursor(0, 0);
  lcd.print("PRESSURE:            ");
   
}

void loop() {
  // read the analog in value:


  sensorValue1 = analogRead(A0)/2;
  sensorValue1 = analogRead(A0)/2;


if(sensorValue1>140)
{
digitalWrite(2,0);
}
else
{
  digitalWrite(2,1);
}

  if(sensorValue1>=160)
    sensorValue1=160;

  if(sensorValue1>100)
  {
  lcd.setCursor(0, 1);
   
  lcd.write((sensorValue1/100)+0x30);    

  lcd.write(((sensorValue1%100)/10)+0x30);    

  lcd.write((sensorValue1%10)+0x30);      
    delay(20);
  lcd.setCursor(8, 1);
  delay(20);  
       delay(20);    
  lcd.write(((sensorValue1-29)/100)+0x30);    
      delay(20);
  lcd.write((((sensorValue1-29)%100)/10)+0x30);    
      delay(20);
  lcd.write(((sensorValue1-29)%10)+0x30);      
    delay(20);

  }
  }
Serial.print("E");
      Serial.write((sensorValue1/100)+0x30);    
      delay(20);
  Serial.write(((sensorValue1%100)/10)+0x30);    
      delay(20);
  Serial.write((sensorValue1%10)+0x30);      
    delay(20);
Serial.print('\n');    
}
}


void serialEvent()
{
  while (Serial.available())
  {
    // get the new byte:
    char inChar = (char)Serial.read();
    // add it to the inputString:

    // if the incoming character is a newline, set a flag
    // so the main loop can do something about it:



  }
}

Comments

Popular posts from this blog

Inverted Linear Quadtree: Efficient Top K Spatial Keyword Search

Inverted Linear Quadtree: Efficient Top K Spatial Keyword Search ABSTRACT: In this paper, With advances in geo-positioning technologies and geo-location services, there are a rapidly growing amount of spatiotextual objects collected in many applications such as location based services and social networks, in which an object is described by its spatial location and a set of keywords (terms). Consequently, the study of spatial keyword search which explores both location and textual description of the objects has attracted great attention from the commercial organizations and research communities. In the paper, we study two fundamental problems in the spatial keyword queries: top k spatial keyword search (TOPK-SK), and batch top k spatial keyword search (BTOPK-SK). Given a set of spatio-textual objects, a query location and a set of query keywords, the TOPK-SK retrieves the closest k objects each of which contains all keywords in the query. BTOPK-SK is the batch processing of sets...

A simple and reliable touch sensitive security system CODING

#include <REGX51.H> #include "lcd.c" #define MAX_DELAY() delay(65000) sbit Vibra_Sense=P3^1; sbit Buz=P1^0; void intro() {  lcd_init();  lcd_str("Touch Sensitive ",0x80);  lcd_str("Security System ",0xc0);  MAX_DELAY();MAX_DELAY();  lcd_clr();  }  void main()  { unsigned int i = 0, j= 0; intro();    while(1)    { lcd_str("Security Syst On",0x80); lcd_str("No Vibra Detectd",0xc0); Buz = 1; if(Vibra_Sense == 1) { while(Vibra_Sense == 1) delay(1000); } else { while(Vibra_Sense == 0) delay(1000); } Buz = 0; lcd_str("Vibraton Detectd",0xc0);delay(65000); while(1);    }  }

A Time Efficient Approach for Detecting Errors in Big Sensor Data on Cloud

A Time Efficient Approach for Detecting Errors in Big Sensor Data on Cloud Abstract                                                                                                                                                      ...