Is this thermistor ntc or ptc and how much is its resistance? l tried to use it for my project (depending on the temperature turning on and off LED)




```cpp
#include <math.h>
#define LED 2

void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);

}

double thermistor(int val){
double temperature;
temperature = log(((10240000 / val) - 10000));
temperature = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * temperature * temperature)) * temperature);
temperature = temperature- 273.15;
return temperature;
}

void loop() {
int value = analogRead(A0);
double temp = thermistor(value);
Serial.println(temp);
delay(50);

}

In the IDE, on the Menu bar, click on Edit then on Copy for Forum.
Then paste your code here. It will be easier to read.

Do you have a DMM/Multimeter?

No sir, the problem is, the place where I bought the thermistor told me that it is NTC. But when I build the circuit and write the code, I cannot see any change whether I heat or cool the NTC. I wonder if there is an error with the code I wrote or is it in the thermistor?

Well let's see if it actually works.
Try this code:
It will print the ADC value and temperature.


#include <math.h>
#define LED 2

void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);

}

double thermistor(int val){
double temperature;
temperature = log(((10240000 / val) - 10000));
temperature = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * temperature * temperature)) * temperature);
temperature = temperature- 273.15;
return temperature;
}

void loop() {
int value = analogRead(A0);
Serial.print("value  = ");
Serial.print(value);
Serial.print("   temp = ");
double temp = thermistor(value);
Serial.println(temp);
delay(500);

}

Is the white wire GND and the orange 5V ?

What does it print?

Post a simple schematic showing how it is wired, the picture does not do it for me. Be sure to indicate polarity on the connecting leads.

Please see posts #4 and #5

The only information we have about this thermistor is that it's green .

It can be a NTC, a PTC, a fuse or a capacitor.
Can you ask around if someone has a multimeter ?

Put the thermistor in line with a resistor and LED. Adjust the PWM to see the LED glow a little. Cool and heat the thermistor. Some of these need to be very hot. I used an NTC in a 50A circuit to slow inrush current.