About Lesson
Temperature Monitoring Device
Introduction
In this module, we are going to introduce a device used for monitoring temperature. For temperature measurement LM35 precision integrated circuit sensor is used. The LCD screen displays the measured temperature continuously. This system is used for checking room temperatures, in weather monitoring devices, and also at many other places.
Components Required
-
-
- Kblox Neo
- LCD (16×2)
- LM35 Temperature Sensor
- Jumper wires [M-F Qty-12, M-M Qty-5]
- Resistors 1K [Qty-1]
-
Code
#include "kblox.h"
kblox kit;
kblox_lcd lcd(12,11,6,5,3,2); // Define RS, EN , D4, D5, D6, D7 here
void setup()
{
Serial.begin(9600);
lcd.begin(16,2); //Initialize the lcd
delay(500);
kit.LM35_begin(A0); // Define LM35 sensor pin
lcd.begin(16,2);
delay(500);
}
void loop()
{
float d = kit.LM35_read('C'); // store temperature data in variable
float E = kit.LM35_read('C');
Serial.println(d); // Serial print stored data
lcd.setCursor(0,0);
lcd.print("in DegreeC= "); // print temperature data in Celsius
lcd.print(d);
lcd.setCursor(0,1);
lcd.print("in Fahrenheit="); // print temperature data in Fahrenheit
lcd.print(d);
delay(1000); //Delay of 1 second for ease of viewing in serial monitor
}
Application
- LM35 sensor is used in making digital thermometers.
- It is used in weather monitoring devices.
- Used in the agriculture field for soil monitoring.