Go Down

Topic: Uno wifi rev 2 and DHT libraries (Read 286 times) previous topic - next topic

davek83056

Hello
I purchased my first Arduino board, a UnoWifi rev 2 a few weeks ago. I have successfully integrated 5 DS18b20 sensors.  I then purchased two DHT22 sensors to integrate. My problem is that the DHT libraries will not compile with this board. If i take an example from dht.h I get a can't compile with this board message. I have checked the board and com setup multiple times. Is this a known issue? I've tried other libraries but all seem to have problems. 

Best
Dave

grwkak

Is register emulation ATMEGA328 enabled?  That might be the issue.

Guy

davek83056

I tried it both ways without success. I'm thinking I may reinstall my libraries. Another could try their software to see if  DHT will compile when software is set to Uno wifi rev 2. Thanks for your response 

grwkak

So your board has been set to Uno WiFi Rev 2?  Sounded like not from the reply.

Guy

davek83056

It is set to uno wifi rev 2. You then have the option for that board of ATMEGA328  emulation or no emulation,  I have tried both. I have another laptop i can try it with. Its easy to check, if you set your software to uno wifi rev 2 and open a dht example does it compile or give an error? You dont need a board to check this.
Thanks for your input!

davek83056

I used a new library for the DHT from Rob Tillaart called DHTstable. When I installed the library it wound up in the incompatible section but It compiled ok so I sent it. The sensor began reading correctly right away. So far this is the only library I found that will work with the Uno Wifi rev 2 for DHT22 sensors. Now I need to figure out how to incorporate this library into my program that polls the five DS18b20 sensors, my burner fail contact and my zone valve status relays. And it would be nice to get the temp in F instead of C


grwkak

Thought using dht.readTemperature(true) gives temp in F?

Will have to try this sometime - using a BME 280 on the WiFi 2 right now, quite successfully.

Guy

grwkak

#7
Nov 23, 2020, 03:27 am Last Edit: Nov 23, 2020, 12:24 pm by grwkak
Duplicated your issue on my new WiFi 2 board.  Also found the code I cited does not work with the DHTstable library.  You may have to use code to convert C to F.

Guy

grwkak

Not sure if you are still working on this, but another library that appears to work is TroykaDHT - Arduino Libraries
This allows the display of temp in Farenheight directly.
I have been doing other projects with this board and run into other incompatibilities - I have a CO2/TVOC sensor that does not function with it.  A bit disappointed really.

Guy

Go Up