int ThermistorPin = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
int analogValue = analogRead(ThermistorPin);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
T = celsius - 273.15;
F = (celsius * 9.0)/ 5.0 + 32.0;
Serial.print("Temperature: ");
Serial.print(T);
Serial.print(" F");
Serial.print("Ohms");
Serial.print("Voltage: ");
Serial.print(analogValue );
Serial.println("Volts");
delay(500);
}