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.
Is register emulation ATMEGA328 enabled? That might be the issue.
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
So your board has been set to Uno WiFi Rev 2? Sounded like not from the reply.
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!
I used a new library for the DHT from Rob Tillaart (https://github.com/RobTillaart/DHTstable/commits?author=RobTillaart) 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
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.
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.
Not sure if you are still working on this, but another library that appears to work is TroykaDHT - Arduino Libraries (https://www.arduinolibraries.info/libraries/troyka-dht)
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.
I'm still working on it and have it working well. I used the code i mentioned before and stripped out everything but the lines i needed. I have the 5 DS18b20 temp sensors, a couple of 24vac relays and the DHT22 reporting every 15 seconds to tera terminal and Tera Terminal logging to a text file. Now I need to integrate it with HMicontroller for Android and eventually Alexa. I'd like to get notifications for low temps, oil burner lockout, water leaks and all the other mayhem that can wreck your house when you're away. I'm going replace my heating system next year so the temp sensors give me base data for my in floor heating loops. I too find a lot of incompatibility with this board.