Humidity example sketch not working



  • I am getting an error when I try and run the example humidity sketch. Error details below

    HumiditySensor copy copy copy.ino:11:5: error: no matching constructor for initialization of 'DHT'
    DHT dht;
    ^
    libraries/DHT/DHT.h:32:3: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
    DHT(uint8_t pin, uint8_t type, uint8_t count=6);
    ^
    libraries/DHT/DHT.h:23:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
    class DHT {
    ^
    1 error generated.

    Any one have any ideas? Pretty new to this.


  • Mod

    Did you download and install all libraries that are available in the MySensors Arduino Master folder (stop running Arduino IDE, copy/paste files in library folder, start Arduino IDE).



  • yes, also I have actually been trying to run it using codebender and didn't work there so then I did try doing it in the native IDE and still not working. My understanding is codebender has all the libraries built in so I am thinking it isn't a library issue, although like I said new at this so may be wrong


  • Mod

    @ajachierno I am not sure what to say, it runs 'out of the box' here.

    Which version of the sketch are you using?

    this is where it goes wrong I guess:

    requires 1 argument, but 0 were provided class DHT


  • I am running straight off the webpage. Actually it doesnt apear I can get any of the sketches to run using either the browser plg in or the native IDE.... 😕 wishing I hadnt updated since this last set of changes.


Log in to reply
 

Suggested Topics

61
Online

11.4k
Users

11.1k
Topics

112.7k
Posts