float temp; // Temperature value storing variable
int tempPin = A0; // Temperature Pin
void setup() // Setup
{
Serial.begin(9600); // Serial Monitor Initialized
}
void loop() // loop started
{
temp = analogRead(tempPin); // Reading Analog Pin
temp = ((double)temp / 1024) * 5; // Converting voltage to Temperature
temp = temp - 0.5;
temp = temp * 100;
Serial.print("TEMPERATURE ="); // Print Temperature
Serial.print(temp);
Serial.print(" *C");
Serial.println();
delay(1000);
}