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

Android Tutorial

Android  is a complete set of software for mobile devices such as tablet computers, notebooks, smartphones, electronic book readers, set-top boxes etc. It contains a  linux-based Operating System ,  middleware  and  key mobile applications . It can be thought of as a mobile operating system. But it is not limited to mobile only. It is currently used in various devices such as mobiles, tablets, televisions etc. This tutorial is developed for beginners and experienced persons. Let's see the topics of android that we are going to learn. Basics of Android In this fundamental chapter, you will learn about android, its components, how to create first android application, internal of first android application etc. What is Android History and Version Software Stack Core Building Blocks Android Emulator Installing softwares Setup Eclipse Hello Android example Internal Details Dalvik VM AndroidManifest.xml R.java Hide Title Bar Activity and I...

CLOUD WORKFLOW SCHEDULING WITH DEADLINE AND TIME SLOT ALGORITHM

CLOUD WORKFLOW SCHEDULING WITH DEADLINE AND TIME SLOT ALGORITHM Abstract Allocating service capacities in cloud computing is based on the assumption that they are unlimited and can be used at any time. However, available service capacities change with workload and cannot satisfy users’ requests at any time from the cloud provider’s perspective because cloud services can be shared by multiple tasks. Cloud service providers provide available time slots for new user’s requests based on available capacities. In this paper, we consider workflow scheduling with deadline and time slot availability in cloud computing. An iterated heuristic framework is presented for the problem under study which mainly consists of initial solution construction, improvement, and perturbation. Three initial solution construction strategies, two greedy- and fair-based improvement strategies and a perturbation strategy are proposed. Different strategies in the three phases result in several heuristics. ...

Force Sensing Resistor FSR400

Force Sensing Resistor FSR400 This is a small  force sensitive resistor . It has a 0.16" (4 mm) diameter active sensing area. This FSR will vary its resistance depending on how much pressure is being applied to the sensing area. The harder the force, the lower the resistance. When no pressure is being applied to the FSR, its resistance will be larger than 1MΩ, with full pressure applied the resistance will be 2.5kΩ. Two pins extend from the bottom of the sensor with 0.1" pitch making it bread board friendly. These sensors are simple to set up and great for sensing pressure, but they aren't incredibly accurate. Use them to sense if it's being squeezed, but you may not want to use it as a scale. Dimensions: Overall length: 1.75" Overall width: 0.28" Sensing area: 0.3"