> For the complete documentation index, see [llms.txt](https://longer-vision-robot.gitbook.io/arduino-full-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://longer-vision-robot.gitbook.io/arduino-full-stack/08_thermist_sensors/011_analogthermist.md).

# 8.2 Analog Thermister

## Hardware Wiring

![Analog Thermist](/files/-LCFELa7XLymgaLAop6G)

## Sketch

The code can be found at [Examples\_Arduino - sensor-kit-for-arduino - \_011\_AnalogThermister - \_011\_AnalogThermister.ino](https://github.com/LongerVisionRobot/Examples_Arduino/blob/master/sensor-kit-for-arduino/_011_AnalogThermister/_011_AnalogThermister.ino).

```
#include <math.h>
double Thermister(int RawADC) {
  double Temp;
  Temp = log(((10240000/RawADC) - 10000));
  Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
  Temp = Temp - 273.15;
  // Convert Kelvin to Celcius
  return Temp;
}
void setup() {
  Serial.begin(9600);
}
void loop() {
  Serial.print(Thermister(analogRead(0)));
  Serial.println("c");
  delay(500);
}
```
