Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHT Library 1.3.0 Does NOt Work #62

Closed
sghazagh opened this issue Oct 28, 2016 · 31 comments
Closed

DHT Library 1.3.0 Does NOt Work #62

sghazagh opened this issue Oct 28, 2016 · 31 comments

Comments

@sghazagh
Copy link

sghazagh commented Oct 28, 2016

Hi,
I can compile my project properly with DHT library 1.2.2.
However, after updating my library to version 1.3.0, this error raised and I cannot compile my project using DHT22 sensor:

//////////////////////////////////

C:\Users\xxxxxx\Documents\Arduino\libraries\DHT_sensor_library/DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory

 #include <Adafruit_Sensor.h>

                             ^

compilation terminated.

exit status 1
Error compiling for board WeMos D1 R2 & mini.

/////////////////////////////

I cannot back to version 1.2.3 it says CRC error.
Backed to 1.2.2 and it compiles correctly.
Can you please advise!

@sghazagh
Copy link
Author

I could manage to fix the compile issue by adding this : https://github.com/adafruit/Adafruit_Sensor

But why we need it in first place and why cannot add it from Library Manager ???
(I manually added this to work)!!!!

@stelgenhof
Copy link

I am experiencing the same and adding #include <Adafruit_Sensor.h> does resolve the issue. It seems a requirement for the DHT Unified sensor, however I am using still the previous way (using DHT.h).

@oy5tein
Copy link

oy5tein commented Nov 3, 2016

1.3.0 is broken here to (and adafruit sensors is not in library manager)
In DHT sensor lib in the lib manager I clicked on select version 1.2.3 and my old sketches started working again.

@sanjaybhagia
Copy link

I even tried version 1.2.3 (also with Adafruit_Sensor.h) but nothing seems to work for me. Its simply fails to read the data from the sensor.

@emilfihlman
Copy link

Broken here, too. Not cool pushing broken things to the public Arduino libraries...

@ViliusKraujutis
Copy link

I fixed this issue by saving this Adafruit_Sensor.h file to new folder $ARDUINO_HOME$/libraries/Adafruit_Sensor/Adafruit_Sensor.h.

@yusufbulentavci
Copy link

Including in this order solves the problem
#include <Adafruit_Sensor.h>
#include "DHT.h"_

@microbuilder
Copy link
Contributor

microbuilder commented Dec 26, 2016

You should be able to install the missing Adafruit_Sensor library from the Library Manager:
screen shot 2016-12-26 at 12 52 24

@salmanfarisvp
Copy link

thanks @ViliusKraujutis. problem solved
@microbuilder can you please add the .json link here...

@vijiarun
Copy link

please can anyone help me solving this??? I too have the same error after downloading the library.

@vijiarun
Copy link

I am getting this error please help me to solve this error: 'dht' does not name a type
dht DHT;

@marcosavini
Copy link

Downgrading the lib to 1.2.3 worked for me.

@pucbaldwin
Copy link

Download the "Adafruit Unified Sensor" library from the library manager - this worked for me.

@JeremyOne
Copy link

I also had a problem with this, downgrading to 1.2.4 worked after I found this thread. It is a little distressing to do the automatic library upgrade in the Arduino IDE and suddenly have a broken compile.

@akeilox
Copy link

akeilox commented Jun 21, 2017

i had this exact same problem, and switching the DHT lib to 1.2.3 does solve the problem of compile error and compiles fine.

Didnt try the route of adding Adafruit Unified Sensor as suggested by others.

@rkveale
Copy link

rkveale commented Aug 9, 2017

As was previously mentioned, download the "Adafruit Unified Sensor" library from the library manager.
http://www.arduinolibraries.info/libraries/adafruit-unified-sensor

@chipytux
Copy link

Downgrade to 1.2.3 Version to solve your issue.

@jimgitonga
Copy link

Download the "Adafruit Unified Sensor" it worked out for me https://github.com/adafruit/Adafruit_Sensor

@chipytux
Copy link

chipytux commented Jan 9, 2018

Thank you @jimgitonga , this work.

Download the "Adafruit Unified Sensor" it worked out for me https://github.com/adafruit/Adafruit_Sensor

@hoegge
Copy link

hoegge commented Jan 10, 2018

But that library is not part of the Arduino IDE library manager, right? Which means a lot of people won't find it. Shouldn't it be included there as a part of the library using it?

@geofbaum
Copy link

@hoegge I don't know which version of the IDE you might be using but I can see the Adafruit Unified Sensor in the library manager. It was the second to last one on the list that I got while filtering the search with 'Unified Sensor.'

@hoegge
Copy link

hoegge commented Jan 10, 2018

@geofbaum 1.8.5 - sorry tried again, now it is there. Must have made a typo or something - sorry for the inconvenience

@geofbaum
Copy link

@hoegge No inconvenience at all! Glad you were able to find it!

@Gacon17
Copy link

Gacon17 commented Apr 8, 2018

Hi sghazagh,

I experienced the same problem, to remove that issue you should re-update the older version such as 1.2.3
It will work as your desire.

@salmanfarisvp
Copy link

For using Adafruit DHT Humidity & Temperature library You must have the Adafruit Unified Sensor Library in Arduino libraries.

@AgusTriwahyudin
Copy link

yes. you can downgrade to version 1.2.3

@Hammerschmidt
Copy link

Hammerschmidt commented Aug 6, 2018

@ViliusKraujutis You also helped me, thanks

@ronnyandre
Copy link

@marcosavini Thanks for the tip. Downgrading did work!

@otmezger
Copy link

It sems that 1.3.1 still has the same problem. Downgrading to 1.2.3 works perfectly

@salmanfarisvp
Copy link

Try to use Adafruit Unified Sensor Library along with DHT lib.

@sachendra003
Copy link

sachendra003 commented Apr 25, 2019

Download the "Adafruit Unified Sensor" library from the library manager - this worked for me.
adafruit sensor header file_LI
vlcsnap-2019-04-25-12h39m06s015_LI

@adafruit adafruit locked as resolved and limited conversation to collaborators May 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests