const float NUM = 3950;
void setup() {
Serial.begin(9600);
}
void loop() { //calculates celsius and fahrenheit and display output
int analogValue = analogRead(A1);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / NUM + 1.0 / 298.15) - 273.15;
float fahrenheit = (celsius * 1.8) + 32;
Serial.print("Temperature: ");
Serial.print(celsius);
Serial.print(" ℃ ");
Serial.print(fahrenheit);
Serial.println(" F ");
delay(1000);
}