the code given by you in the following project is not executing
https://circuitdigest.com/microcontroller-projects/automatic-temperature-controlled-fan-project
even after including all reqired libraries
please could you send me the rectified code or tell me the errors it would be of great help
heree is the full error code
Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Uno"
sketch_jan15b:6:1: error: 'dht' does not name a type
dht DHT;
^
C:\Users\CS1\Documents\Arduino\sketch_jan15b\sketch_jan15b.ino: In function 'void loop()':
sketch_jan15b:39:6: error: expected unqualified-id before '.' token
DHT.read11(dht_dpin);
^
sketch_jan15b:40:15: error: expected primary-expression before '.' token
int temp=DHT.temperature;
^
exit status 1
'dht' does not name a type
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
it is due to insertion of incorrect library..Please download the library from the link below and include it in your code.it will work.
https://drive.google.com/file/d/0B1paTI5fzcHodno5azFOSVVDT0E/view?usp=s…
The dht library you have used is not the correct one for which the code is written.So upload the correct one.it will work
i changed the library according to that code but it gives the following error
sketch_jan15b:1:50: error: dht.h: No such file or directory
compilation terminated.
exit status 1
dht.h: No such file or directory
could anyone please send me a working code
It seems the new dht.h library has not been included correctly.You can do one thing, go to file->examples in Arduino IDE and then compile that.If that is compiling successfully then just edit your code as per that.Dont forgot to delete the previous dht library from this location C:\Users\Admin\Documents\Arduino\libraries.It will work.Because code is tested and working fine with us.Hope it helps!!!
I forgot to mention that, from file->examples, go to dht library code you have included and compile that.
The code on the forum link is tested by the moderators. But there is issue with the libraries, available at different forums like on github, several libraries are available for dht, some of those are working and some of those are not working properly. If you already added a dht library, first of all remove the previous one and then go to arduino and import library which you downloaded, as there is option available for importing .zip libraries. After importing library, compile your code, hope your problem will get resolved. Here I would like to suggest you to visit SSLA and contact with the technical support team, they will support you in completion of your projects.
The code on the forum link is tested by the moderators. But there is an issue with the libraries, available at different forums like on github, several libraries are available for dht, some of those are working and some of those are not working properly. If you already added a dht library, first of all remove the previous one and then go to arduino and import library which you downloaded, as there is an option available for importing .zip libraries. After importing the library, compile your code; I hope your problem will get resolved. Here I would like to suggest you to visit Sierra Software Ltd. and contact the technical support team; they will support you in completion of your projects.
Debasis Parida
PermalinkHi jeston, it may be due to the inproper library.Can you please tell us the exact error showing when you compile your code.It will be better for us to recognise the error.Because code in our side is correct and working properly.
- Log in or register to post comments
Joined August 22, 2019 125Thursday at 12:29 PM