Friday, November 8, 2013

LM35(temparature sensor) with arduino

LM35 is the temparature sensor  it give the values those are the analog values .
here i connected the LM 35 with arduino on the analog port.
it is working properly and giving the values..
for pin discription see below the code.

/*

  distance sensor]
 VCC to arduino 5v GND to arduino GND
temp sensor output to Arduino pin 15
 More info at: http://anildurgam.blogspot.in/


sponsred by the potentiallabs
visit us
http://potentiallabs.com/
http://potentiallabs.com/cart


 */


float temp;
int tempPin = 15;

void setup()
{
  Serial.begin(9600);
  pinMode(tempPin ,INPUT);
  Serial.print("serial monitor is ready...waiting for the results");
}

void loop()
{
  temp = analogRead(tempPin);
  temp = temp * 0.48828125;
  Serial.print("TEMPRATURE = ");
  Serial.print(temp);
  Serial.print("*C");
  Serial.println();
  delay(1000);



}

No comments:

Post a Comment

MM32f103 led blink program

To work on mind motion MM32 microcontroller we need to install the keil uvision 5 version then install the mm32-link programmer go to li...