Temperature Indicator or Temperature Monitoring system is very useful in industries. This is a very simple project to understand the basics of Arduino. Over here we are using LM35 temperature sensor and reading the temperature using the analog pin A1 of Arduino Uno and then sends serially to PC.
The arduino gets the temperature from Sensor and displays on PC after every 1 second in Degree Centigrade as well as in Degree Fahrenheit.
Components Used
- Arduino Uno
- LM35 Temperature Sensor
Circuit Diagram
Circuit Diagram |
Implementation
Implemented Circuit |
Circuit Output on PC |
Code
You can Download the complete Code over Here
/*
PC based Temperature Indicator
Tested By Amol Shah from DNA Technology : http://www.dnatechindia.com/
For https://makeelectronicprojects.blogspot.in
*/
int val;
int tempPin = 1;
void setup()
{
Serial.begin(9600);
Serial.println("PC based Temperature Indicator");
Serial.println("Tested By Amol Shah from DNA Technology : http://www.dnatechindia.com/");
Serial.println("For https://makeelectronicprojects.blogspot.in");
}
void loop()
{
val = analogRead(tempPin);
float mv = ( val/1024.0)*5000;
float cel = mv/10;
float farh = (cel*9)/5 + 32;
Serial.print("TEMPRATURE = ");
Serial.print(cel);
Serial.print("*C");
Serial.println();
Serial.print("TEMPRATURE = ");
Serial.print(farh);
Serial.print("*F");
Serial.println();
delay(1000);
}
0 comments:
Post a Comment