LM35 Temperature sensor with CloudX CloudX

  • img
Project Details

LM35 is a temperature sensor which can measure temperature in the range of -55°C to 150°C.

It is a 3-terminal device that provides analog voltage proportional to the temperature. Higher the temperature, higher is the output voltage.

The output analog voltage can be converted to digital form using ADC so that a microcontroller can process it.

 

Operations

Measuring the temperature of surroundings using LM35 and displaying it on the LCD with CloudX.

Here, LM35 output is given to analog pin A0 of CloudX M633. This analog voltage is converted to its digital form and processed to get the temperature reading.

 

Wiring

 

Code

#include <CloudX\LM35.h>  
#include <CloudX\LCD.h>
#include <CloudX\conversion.h>

const char degreeSign[] = {6, 9, 9, 6, 0, 0, 0, 0};
char *txt;

setup(){
//setup here
LCD_setting(1, 2, 3, 4, 5, 6); //RS, EN, D4, D5, D6, D7
LCD_cmd(clear);
LCD_cmd(cursorOff);
LCD_writeText(1, 1, "Temp: ");



loop(){
//Program here
txt = floatTostr(LM35_read(0)); //reads temperature off channel A0
txt[5] = '\0';
LCD_writeText(1,8,txt);
LCD_writeCustomChar(0, 0, 0, degreeSign);
LCD_writeCP('C');
}
}

 

Project Simulation

Share this with friends