Use library "Thermistor.h" in Arduino IOT Cloud

Hello Makers,

I'm trying to create a datalogger using NTC 10K in an ESP32.

Using the web editor, the code is not compiling and show the above message.

Do you have any idea about what is happening?

Here is the code:

/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/5a31c606-ef60-4086-af1d-d7d65117d892 

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  CloudTemperatureSensor temperatura01;
  CloudTemperatureSensor temperatura02;
  CloudTemperatureSensor temperatura03;
  CloudTemperatureSensor temperatura04;
  
  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"
#include "Thermistor.h" // Inclusão da biblioteca termistor

Thermistor temp1(36); 
Thermistor temp2(39); 
Thermistor temp3(34); 
Thermistor temp4(35); 

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  
  
}
Start verifying
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:23:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp1(36);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:23:12: error: cannot declare variable 'temp1' to be of abstract type 'Thermistor'
 Thermistor temp1(36);
            ^~~~~
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   because the following virtual functions are pure within 'Thermistor':
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:41:18: note: 	'virtual double Thermistor::readCelsius()'
   virtual double readCelsius() = 0;
                  ^~~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:48:18: note: 	'virtual double Thermistor::readKelvin()'
   virtual double readKelvin() = 0;
                  ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:55:18: note: 	'virtual double Thermistor::readFahrenheit()'
   virtual double readFahrenheit() = 0;
                  ^~~~~~~~~~~~~~
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:24:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp2(39);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:24:12: error: cannot declare variable 'temp2' to be of abstract type 'Thermistor'
 Thermistor temp2(39);
            ^~~~~
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:25:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp3(34);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:25:12: error: cannot declare variable 'temp3' to be of abstract type 'Thermistor'
 Thermistor temp3(34);
            ^~~~~
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:26:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp4(35);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:26:12: error: cannot declare variable 'temp4' to be of abstract type 'Thermistor'
 Thermistor temp4(35);
            ^~~~~
Multiple libraries were found for "WiFi.h"
  Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.5/libraries/WiFi
  Not used: /home/builder/opt/libraries/wifinina_1_8_14
  Not used: /home/builder/opt/libraries/wifiespat_1_4_3
  Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_0_6
  Not used: /home/builder/opt/libraries/wifi_1_2_7
  Not used: /home/builder/opt/libraries/vega_wifinina_1_0_1
  Not used: /home/builder/opt/libraries/indhilib_3_0_5
  Not used: /home/builder/opt/libraries/da16200_wi_fi_library_for_arduino_1_1_0
Multiple libraries were found for "WiFiClientSecure.h"
  Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.5/libraries/WiFiClientSecure
  Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_0_6
Error during build: exit status 1

/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:23:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp1(36);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:23:12: error: cannot declare variable 'temp1' to be of abstract type 'Thermistor'
 Thermistor temp1(36);
            ^~~~~
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   because the following virtual functions are pure within 'Thermistor':
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:41:18: note: 	'virtual double Thermistor::readCelsius()'
   virtual double readCelsius() = 0;
                  ^~~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:48:18: note: 	'virtual double Thermistor::readKelvin()'
   virtual double readKelvin() = 0;
                  ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:55:18: note: 	'virtual double Thermistor::readFahrenheit()'
   virtual double readFahrenheit() = 0;
                  ^~~~~~~~~~~~~~
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:24:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp2(39);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:24:12: error: cannot declare variable 'temp2' to be of abstract type 'Thermistor'
 Thermistor temp2(39);
            ^~~~~
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:25:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp3(34);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:25:12: error: cannot declare variable 'temp3' to be of abstract type 'Thermistor'
 Thermistor temp3(34);
            ^~~~~
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:26:20: error: no matching function for call to 'Thermistor::Thermistor(int)'
 Thermistor temp4(35);
                    ^
In file included from /tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:21:
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor()'
 class Thermistor {
       ^~~~~~~~~~
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   candidate expects 0 arguments, 1 provided
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note: candidate: 'constexpr Thermistor::Thermistor(const Thermistor&)'
/home/builder/Arduino/libraries/ntc_thermistor_2_0_3/src/Thermistor.h:26:7: note:   no known conversion for argument 1 from 'int' to 'const Thermistor&'
/tmp/3233030389/Untitled_oct22a/Untitled_oct22a.ino:26:12: error: cannot declare variable 'temp4' to be of abstract type 'Thermistor'
 Thermistor temp4(35);
            ^~~~~
Multiple libraries were found for "WiFi.h"
  Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.5/libraries/WiFi
  Not used: /home/builder/opt/libraries/wifinina_1_8_14
  Not used: /home/builder/opt/libraries/wifiespat_1_4_3
  Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_0_6
  Not used: /home/builder/opt/libraries/wifi_1_2_7
  Not used: /home/builder/opt/libraries/vega_wifinina_1_0_1
  Not used: /home/builder/opt/libraries/indhilib_3_0_5
  Not used: /home/builder/opt/libraries/da16200_wi_fi_library_for_arduino_1_1_0
Multiple libraries were found for "WiFiClientSecure.h"
  Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.5/libraries/WiFiClientSecure
  Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_0_6
Error during build: exit status 1

In the NTC_Thermistor library, the Thermistor class is an abstract class used within the library to create other concrete classes. Please consult the examples in the library to see the proper way to use the library.

Hi @carllosedward. Did you base this code on some reference or tutorial you found online? If so, please provide a link to that web page in a reply here.

There are multiple Arduino libraries that contain a file with the common name "Thermistor.h". If you are following information that is using a different library than the one that is preinstalled in Arduino Cloud then will have troubles such as the error messages you encountered.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.