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.
-
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
-
@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.
Suggested Topics
-
Connect humidity sensor to OpenHAB
OpenHAB • 12 Feb 2015, 03:18 • vladimir 18 Feb 2015, 12:38 -
Temperature sensor sketch only sending battery info to mqtt
Hardware • 10 Apr 2018, 10:21 • Mr_sensor 10 Apr 2018, 14:29 -
💬 Arduino Pro Mini Shield for RFM69(H)W
OpenHardware.io • 2 Nov 2016, 18:10 • openhardware.io 24 Mar 2018, 11:45 -
Starry Sky
OpenHardware.io • 24 Mar 2016, 09:55 • openhardware.io 5 Nov 2016, 07:26 -
SerialGateway Error
Vera • 27 Aug 2015, 20:13 • Newzwaver 11 Sept 2015, 09:38 -
💬 MySensors node
OpenHardware.io • 7 Jan 2016, 14:34 • openhardware.io 18 Jan 2016, 15:27 -
💬 LoRa ESP32 Low Power Lerning Board
OpenHardware.io • 8 May 2019, 08:49 • openhardware.io 8 May 2019, 08:49 -
Motion Sensing sketch which is also a repeater
Troubleshooting • 18 Jan 2015, 10:07 • Dean 15 Mar 2015, 04:08