// // http://www.mediafire.com/file/9uadw6558mswmwc/arduino-lib-thermistor.zip
// // Arduino\RBTech\Iniciantes\10-termistor\Thermistor
// // arduino-lib-thermistor
// #include "Thermistor.h"
// Thermistor temp(A0);
// void setup() {
// // put your setup code here, to run once:
// Serial.begin(9600);
// }
// void loop() {
// // put your main code here, to run repeatedly:
// int temperatura = temp.getTemp();
// Serial.print("Temperatura: ");
// Serial.print(temperatura);
// Serial.println(" oC");
// delay(1000);
// }
#include "thermistor.h"
#include "HardwareSerial.h"
// Analog pin used to read the NTC
#define NTC_PIN A0
// Thermistor object
THERMISTOR thermistor(NTC_PIN, // Analog pin
10000, // Nominal resistance at 25 ºC
3950, // thermistor's beta coefficient
10000); // Value of the series resistor
// Global temperature reading
uint16_t temp;
void setup()
{
Serial.begin(9600);
}
void loop()
{
temp = thermistor.read(); // Read temperature
Serial.print("Temp in 1/10 ºC : ");
Serial.println(temp);
Serial.println("-----------------------");
delay(5000);
}