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

Comments

@sghazagh
Copy link

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

This comment has been minimized.

Copy link
Author

commented Oct 28, 2016

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

This comment has been minimized.

Copy link

commented Nov 1, 2016

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Nov 5, 2016

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

This comment has been minimized.

Copy link

commented Nov 12, 2016

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

@ViliusKraujutis

This comment has been minimized.

Copy link

commented Nov 28, 2016

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

@yusufbulentavci

This comment has been minimized.

Copy link

commented Dec 24, 2016

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

@microbuilder

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Jan 6, 2017

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

@vijiarun

This comment has been minimized.

Copy link

commented Apr 10, 2017

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

@vijiarun

This comment has been minimized.

Copy link

commented Apr 10, 2017

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

@marcosavini

This comment has been minimized.

Copy link

commented Apr 17, 2017

Downgrading the lib to 1.2.3 worked for me.

@pucbaldwin

This comment has been minimized.

Copy link

commented Apr 17, 2017

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

@JeremyOne

This comment has been minimized.

Copy link

commented May 3, 2017

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Oct 27, 2017

Downgrade to 1.2.3 Version to solve your issue.

@jimgitonga

This comment has been minimized.

Copy link

commented Jan 3, 2018

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

@chipytux

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jan 10, 2018

@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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jan 10, 2018

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

@Gacon17

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Apr 8, 2018

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

@AgusTriwahyudin

This comment has been minimized.

Copy link

commented Jul 6, 2018

yes. you can downgrade to version 1.2.3

@Hammerschmidt

This comment has been minimized.

Copy link

commented Aug 6, 2018

@ViliusKraujutis You also helped me, thanks

@ronnyandre

This comment has been minimized.

Copy link

commented Dec 14, 2018

@marcosavini Thanks for the tip. Downgrading did work!

@otmezger

This comment has been minimized.

Copy link

commented Jan 20, 2019

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

@salmanfarisvp

This comment has been minimized.

Copy link

commented Jan 22, 2019

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

@sachendra003

This comment has been minimized.

Copy link

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.
Projects
None yet
You can’t perform that action at this time.