#include <math.h>
// Sensing Analog pin input at A5 pin and converting it to digital value on the Arduino Uno Board
int sensorPin = A5; // select the arduino board input pin A5
float Thermister(int RawADC)
{
float Temp = 0.0;
double adc = 0.0;
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
Serial.println(analogRead(sensorPin));
Serial.println (digitalRead(sensorPin));
//Temp=((RawADC-0)*((125-(-55))/(1023-0)))+(-55);
//Temp = 1 / (log(1 / (1023 / RawADC - 1)) / BETA + 1.0 / 298.15) - 273.15;
return Temp;
}
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print(Thermister(digitalRead(sensorPin))); //read pin A5
Serial.println("C");
delay(500);
}