int temp = A0;
int last_pin = 10;
void setup() {
for (int i = 1; i < last pin, i++)
pinMode(i, OUTPUT);
pinMode(temp, INPUT);
Serial.begin(9600);
}
void loop() {
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
int analogValue = analogRead(A0);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
Serial.print(celsius);
Serial.println("C");
}