Problem with libraries



  • I think that after arduino upgrade to 1.8.10 there were problems with libraries. I have a problem running Air Humidity - DHT. Its standard code.

    Arduino: 1.8.10 (Windows 10), Board: "Arduino Nano, ATmega328P"
    
    sketch_nov14a:74:5: error: no matching function for call to 'DHT::DHT()'
    
     DHT dht;
    
         ^~~
    
    In file included from D:\Arduino_temp\sketch_nov14a\sketch_nov14a.ino:44:0:
    
    D:\Arduino_temp\libraries\DHT-sensor-library-master/DHT.h:49:4: note: candidate: DHT::DHT(uint8_t, uint8_t, uint8_t)
    
        DHT(uint8_t pin, uint8_t type, uint8_t count=6);
    
        ^~~
    
    D:\Arduino_temp\libraries\DHT-sensor-library-master/DHT.h:49:4: note:   candidate expects 3 arguments, 0 provided
    
    D:\Arduino_temp\libraries\DHT-sensor-library-master/DHT.h:47:7: note: candidate: constexpr DHT::DHT(const DHT&)
    
     class DHT {
    
           ^~~
    
    D:\Arduino_temp\libraries\DHT-sensor-library-master/DHT.h:47:7: note:   candidate expects 1 argument, 0 provided
    
    D:\Arduino_temp\libraries\DHT-sensor-library-master/DHT.h:47:7: note: candidate: constexpr DHT::DHT(DHT&&)
    
    D:\Arduino_temp\libraries\DHT-sensor-library-master/DHT.h:47:7: note:   candidate expects 1 argument, 0 provided
    
    D:\Arduino_temp\sketch_nov14a\sketch_nov14a.ino: In function 'void setup()':
    
    sketch_nov14a:92:7: error: 'class DHT' has no member named 'setup'
    
       dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
    
           ^~~~~
    
    sketch_nov14a:93:30: error: 'class DHT' has no member named 'getMinimumSamplingPeriod'
    
       if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
    
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
    
    sketch_nov14a:98:13: error: 'class DHT' has no member named 'getMinimumSamplingPeriod'
    
       sleep(dht.getMinimumSamplingPeriod());
    
                 ^~~~~~~~~~~~~~~~~~~~~~~~
    
    D:\Arduino_temp\sketch_nov14a\sketch_nov14a.ino: In function 'void loop()':
    
    sketch_nov14a:105:7: error: 'class DHT' has no member named 'readSensor'
    
       dht.readSensor(true);
    
           ^~~~~~~~~~
    
    sketch_nov14a:108:27: error: 'class DHT' has no member named 'getTemperature'; did you mean 'readTemperature'?
    
       float temperature = dht.getTemperature();
    
                               ^~~~~~~~~~~~~~
    
                               readTemperature
    
    sketch_nov14a:119:25: error: 'class DHT' has no member named 'toFahrenheit'
    
           temperature = dht.toFahrenheit(temperature);
    
                             ^~~~~~~~~~~~
    
    sketch_nov14a:135:24: error: 'class DHT' has no member named 'getHumidity'; did you mean 'readHumidity'?
    
       float humidity = dht.getHumidity();
    
                            ^~~~~~~~~~~
    
                            readHumidity
    
    Multiple libraries were found for "SPI.h"
     Used: D:\Arduino\hardware\arduino\avr\libraries\SPI
    Multiple libraries were found for "MySensors.h"
     Used: D:\Arduino_temp\libraries\MySensors-master
    Multiple libraries were found for "DHT.h"
     Used: D:\Arduino_temp\libraries\DHT-sensor-library-master
     Not used: D:\Arduino_temp\libraries\arduino-DHT-master
    Multiple libraries were found for "Adafruit_Sensor.h"
     Used: D:\Arduino_temp\libraries\Adafruit_Unified_Sensor
    exit status 1
    no matching function for call to 'DHT::DHT()'
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    
    

Log in to reply
 

Suggested Topics

  • 4
  • 9
  • 14
  • 933
  • 2
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts