The DHT library has not officially been ported to the Edison IDE. However, in other posts in the community such as https://communities.intel.com/thread/53869 , other users have created their own DHT libraries for the Galileo board. I tried one of the examples in my Edison and it compiled, but was not able to test it because I don’t have the DHT22. You can try porting them on the Edison board and post your results in the community.
You can use Adafruits DHT 11 and 22 library with Edison it has worked for me download it from here
Download and unzip it then rename it ie DHT it works
put it in the /Arduino/Libraries folder/DHT
Been trying to use this lib, buy I get an error compiling, seems tg function is missing: microsecondsToClockCycles
Are you using an specific version?
Adafruits Library for DHT22 wont work on Edison because of the following reasons:
1. microsecondsToClockCycles can't be rewritten for Edison because it is running Linux and it is not really "Real-time" operating system, so it may take different time to execute the same function (depends on many factors).
2. Switching ports from 'Output' to 'Input' is to slow on Intel Edison. When I tested it I was able to receive only last 10-12 bits out of 40 bits from the DHT22 due to slow transition of the pin from Output to Input.
So I resolved the issue by using 2-pin solution (connecting diode between pins 7 and 8).
Is there any solution for DHT 22( temperature and humidity for Edison Arduino expansion board with out extra hardware Like diode.
My Question is is there any software solution with out hardware.
I want to use DHT 22 for Edison.
can you provide diode details for above thread.