- Netduino Forums
- → randalx's Content
randalx's Content
There have been 3 items by randalx (Search limited from 28-September 23)
#19094 DHT11/22 sensor managed driver
Posted by randalx on 13 October 2011 - 01:09 AM in Project Showcase
#19139 DHT11/22 sensor managed driver
Posted by randalx on 14 October 2011 - 01:16 AM in Project Showcase
Well, I have not tried the code on Netduino Plus - your wiring seems to be fine (unless you've flipped the sensor), but it may be possible that for example network communication interrupts disturb the pulse measurement. Could you please try unplugging the network cable? Or do you have any other code running (e.g. in background thread) that may affect the communication with DHT sensor?
Unfortunately, unplugging the network cable made no difference. I triple checked the wiring and it seems correct. The CheckPins() call passes successfully.
What is the value of bitMask field when the method returns? Have you tried increasing the timeout value (e.g. 200 instead of 50)? Also, try adding some diagnostic output (Debug.Print()) into portIn_OnInterrupt handler to verify it is being called.
With the default timeout of 50ms the bitmask makes it down to 2199023255552. I had to increase it to 2000ms to be able to get it down to 0, but that just resulted in checksum failures.
The portIn_OnInterrupt method is called repeatedly but I noticed that most of the time the BitThreshold is being exceeded.
if((ticks - lastTicks) > BitThreshold)
I ran several calls in a loop but never had a single successful result.
Should I conclude that my netduino plus is running slower than the norm?
Thanks again for the help.
#19385 DHT11/22 sensor managed driver
Posted by randalx on 19 October 2011 - 01:31 AM in Project Showcase
- Netduino Forums
- → randalx's Content
- Privacy Policy