LM35 Arduino Library

This library for Arduino allows you to use the LM35 Analog Temperature Sensor to measure the ambient temperature and output it in Celsius. You can view the datasheet at http://www.ti.com/product/lm35.

Examples

#include "LM35.h"

void loop() {
    LM35 sensor1(A0); // Sensor connected to pin A0
    double temp = sensor1.read(); //Returns temperature based on a single reading
    double temp1 = sensor1.read(5); //Returns temperature based on 5 readings (more accurate but slower)
}

Download (LM35-library.zip)

How to Install a Library

 

GitHub Repository: https://github.com/ricardosequeira/LM35-Arduino-Library

You may also like...

3 Responses

  1. Kadu diz:

    Brow, muito boa sua iniciativa, já está no Github o código ?
    Tive a liberdade de fazer um “fork” -> ttps://github.com/kadu/arduinolm35, estou tentando por a pasta examples com seu código pra ficar mais show ainda.

    []s

  2. Artur diz:

    Is it possible to connect some sort of filter to the input A0?
    I have a sensor LM35dz happens is that after 5-10 pops one value exceeds by 3-4 degrees. Can I fight this like that?

  3. Marcio diz:

    Bom dia!
    Ótima a iniciativa, porém, a linha LM35 sensor(A0), não ficaria melhor no void setup()?
    Desculpe se estou falando besteira.

  1. 25/09/2015

    […] Library for LM35 temperature sensor. Created by Ricardo Sequeira, February 13, 2014. Website: http://ricardo-sequeira.com/lm35-arduino-library/ Github: […]

Responder a Kadu Cancelar resposta

O seu endereço de email não será publicado. Campos obrigatórios marcados com *