I am completely baffled. When I wire the thermistor into my Nano, everything reads completely fine. Then when I switch to the Uno Wifi Rev 2, I get negative numbers -40 to -80 when I was reading 24 on the Nano.
Wiring Diagram is:
Thermistor
| |
Gnd---Resistor Vcc
|
A6/A0 (6 for nano, 0 for Uno)
Code is:
#include <thermistor.h>
#define pin A6 //I change this to A0 on the WIfi. This is the only change
float temp;
uint32_t timeout = millis();
THERMISTOR thermistor(pin, //Analog pin
9800, //Nominal res at 25 ºC
3559, //Thermistor's B value
10000); //Value of the resistor
void setup() {
Serial.begin(9600);
}
void loop() {
delay(1000);
temp = thermistor.read();
Serial.println(temp);
}