Arduino LM35
From
LM35 is a tempature sensor common TO-92 temperature sensor.
See also : instructables
Schematic
- Arduino Analoog 0 -->
- Arduino GND -->
- Arduino +5V -->
Example code
//Example code for LM35 //Done by TkkrLab // named constant for the pin the sensor is connected to const int sensorPin = A0; float tempC; int reading; void setup(){ // open a serial connection to display values Serial.begin(9600); //Setup LM35 analogReference(INTERNAL); } void loop() { reading = analogRead(sensorPin); tempC = reading / 9.31; // send the sensor value out the serial port Serial.print("sensor Temp: "); Serial.println(tempC); delay(100); }