Hi,
I have a thermistor 10k
using 3.3v
i’m testing the sample code of thermistor-library but when I click verify to build bin file I receive this errors:
I don’t understand this errors and can’t find a solution.
////////////
In file included from ../inc/spark_wiring.h:29:0,
from ../inc/application.h:29,
from thermistor-library/thermistor-library.h:2,
from example.cpp:1:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
#warning "Defaulting to Release Build"
^
example.cpp: In function 'void loop()':
example.cpp:25:37: error: no matching function for call to 'Thermistor::getTempC()'
^
example.cpp:25:37: note: candidate is:
In file included from example.cpp:1:0:
thermistor-library/thermistor-library.h:18:9: note: float Thermistor::getTempC(bool)
float getTempC(bool smooth);
^
thermistor-library/thermistor-library.h:18:9: note: candidate expects 1 argument, 0 provided
make: *** [example.o] Error 1
Error: Could not compile. Please review your code.
///////////
full code:
#include "thermistor-library/thermistor-library.h"
// Analog pin the thermistor is connected to
int thermPin = A1;
// Voltage divider resistor value
int thermRes = 10000;
// Configure the Thermistor class
Thermistor Thermistor(thermPin, thermRes);
void setup() {
// Start Serial output
Serial.begin(9600);
// Initialize the Thermistor class
Thermistor.begin();
}
void loop() {
// Print temperature in degrees Celsius
Serial.print("Celsius: ");
Serial.println(Thermistor.getTempC());
// Wait 1 second
delay(1000);
}