My Sesnor DHT - can't upload to Uno
-
Hello.
I'm trying to upload a example sketch from mysensors.org and I have this error... Reinstalled Arduino, downloaded DHT libraries and still nothing....
This is error:`
DHTSensor:41: error: no matching function for call to 'DHT::DHT()'
DHT dht;
^
D:\Arduino\DHTSensor\DHTSensor.ino:41:5: note: candidates are:
In file included from D:\Arduino\DHTSensor\DHTSensor.ino:12:0:
C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:40:4: note: DHT::DHT(uint8_t, uint8_t, uint8_t)
DHT(uint8_t pin, uint8_t type, uint8_t count=6);
^
C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:40:4: note: candidate expects 3 arguments, 0 provided
C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: constexpr DHT::DHT(const DHT&)
class DHT {
^
C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: candidate expects 1 argument, 0 provided
C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: constexpr DHT::DHT(DHT&&)
C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: candidate expects 1 argument, 0 provided
D:\Arduino\DHTSensor\DHTSensor.ino: In function 'void setup()':
DHTSensor:59: error: 'class DHT' has no member named 'setup'
dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
^
DHTSensor:60: error: 'class DHT' has no member named 'getMinimumSamplingPeriod'
if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
^
DHTSensor:65: error: 'class DHT' has no member named 'getMinimumSamplingPeriod'
sleep(dht.getMinimumSamplingPeriod());
^
D:\Arduino\DHTSensor\DHTSensor.ino: In function 'void loop()':
DHTSensor:72: error: 'class DHT' has no member named 'readSensor'
dht.readSensor(true);
^
DHTSensor:75: error: 'class DHT' has no member named 'getTemperature'
float temperature = dht.getTemperature();
^
DHTSensor:82: error: 'class DHT' has no member named 'toFahrenheit'
temperature = dht.toFahrenheit(temperature);
^
DHTSensor:99: error: 'class DHT' has no member named 'getHumidity'
float humidity = dht.getHumidity();
^
exit status 1
no matching function for call to 'DHT::DHT()'Please help!!!
-
It really looks like it cant find the DHT library... or you have the wrong lib installed.
Open the dht.cpp file in notepad and see if you find the functions like getTemperature() and so on.
-
Can't see getTemperature in dht.cpp. There is "readTemperature", "readHumidity" etc... but nothing like "get"
-
@robertmt - then you are using the wrong DHTlib.
Download it from Mysensors github and use the example sketch and it will work:
https://github.com/mysensors/MySensorsArduinoExamplesthere is a getTemperature() in this lib.
-
Thanks... it helped a bit. No more DHT error... but now:
avr-g++: error: CreateProcess: No such file or directory
exit status 1
Error compiling for board Arduino/Genuino Uno.
Invalid version found: 1.04
Invalid version found: 1.04
-
I'm lost....
I've installed Arduino ver 1.6.6 than I had an error
avr-g++: error: missing filename after '-o'removed everything and installed ver. 1.6.12 ... libraries from github:
https://github.com/mysensors/MySensors
https://github.com/mysensors/MySensorsArduinoExampleseverything inside:
C:\Users\Robert\Documents\Arduino\libraries\MySensorsnow error:
C:\Users\Robert\Documents\Arduino\libraries\MySensors\examples\DhtTemperatureAndHumiditySensor\DhtTemperatureAndHumiditySensor.ino:44:17: fatal error: DHT.h: No such file or directory
#include <DHT.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
-
hello again:
my latest trial gave me something like this:
avr-g++: error: CreateProcess: No such file or directory
exit status 1
Error compiling for board Arduino/Genuino Uno.
Invalid version found: 1.04anyone???
-
Ok... Looks like issue was with windows and some SH...T in AppData and Temp...
Removed everything related with arduino and maneged to upload a sketch.
(Maybe somebody else will have a same issue)Only one thing left, this:
Invalid version found: 1.04
Any idea what can it be? My Arduino IDE is 1.6.12 on Windows 7.Thanks in advance
-
@robertmt Yes I have similar problems
But have not had the time to look into this yet.
Hopefully later today (or maybe closer to the weekend)