J 창고

[Arduino] LM35 온도센서 본문

컴퓨터/Firmware

[Arduino] LM35 온도센서

JSFamily 2013. 9. 30. 19:33



http://www.ti.com/lit/ds/symlink/lm35.pdf

LM35 Datasheet




http://blog.naver.com/lgiclee?Redirect=Log&logNo=40112342040

또 다른 방식으로 수치를 재는 방식



LM35


온도 센서를 이용하여 아두이노에서 온도 측정


ps. 핀 구분할 때 Buttom View를 조심하자



int temp = A5;

int tempValue = 0;

int data=0;


void setup(){

  

  Serial.begin(9600);

}


void loop(){

  tempValue = analogRead(temp);

  data = (500*tempValue)>>10;    // LM35DZ Converting Function

  Serial.print("Temp = ");

  Serial.println(data);

  delay(500);

}

  

Comments