Monday, June 13, 2016

Digital Thermometer using LM35 Temperature Sensor

Here we are using Arduino Board and LM35 temperature sensor to make a Digital Thermometer. This project can be further extended to a stand-alone device by incorporating a 16x2 character LCD display. To know about how to use LCD displays, refer to Wiring a 16x2 LCD display with Arduino. But for simplicity and understanding purpose we will be using the serial console to get the output here.

Below is the wiring:


The code:

float temperature;
int sensorPin = 0;

void setup(){

    Serial.begin(9600);
}

void loop(){

    temperature = analogRead(sensorPin);
    temperature = temperature * 0.488;

    Serial.print(temperature);
    Serial.println(" C");
    delay(1000);
}

No comments: