const int temp = A0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
float voltage = analogRead(temp);
float DegreeC = (voltage - 0.5)*100;
float DegreeF = DegreeC*(9.0/5.0)+32.0;
Serial.print("Temperature in C");
Serial.println(DegreeC);
Serial.print("Temperature in F");
Serial.println(DegreeF);
delay(15000);
}