Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

randalx's Content

There have been 3 items by randalx (Search limited from 24-May 23)


By content type

See this member's

Sort by                Order  

#19385 DHT11/22 sensor managed driver

Posted by randalx on 19 October 2011 - 01:31 AM in Project Showcase

I tried running the code alone and got the same results. I also tried the sensor with an Arduino and the sensor worked successfully so it's not a defective sensor. I'm new to hardware so I don't think I'll be able to attempt to investigate further on my own. Thanks anyhow for the help.



#19139 DHT11/22 sensor managed driver

Posted by randalx on 14 October 2011 - 01:16 AM in Project Showcase

Thanks for taking the time to respond to my questions.

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.



#19094 DHT11/22 sensor managed driver

Posted by randalx on 13 October 2011 - 01:09 AM in Project Showcase

Hi, I tried your code but unfortunately it's not working for me. Perhaps it's my wiring? This is how I set it up the wiring between a Netduino Plus and the DHT22 sensor: Pin 1 -> VCC Pin 2 -> D0 and D1 Pin 4 -> Ground And a 10K resistor between Pin 1 and Pin 2. I initialize with var dhtSensor = new Dht22Sensor(Pins.GPIO_PIN_D0, Pins.GPIO_PIN_D1, PullUpResistor.External); But fail when calling Read: DhtSensor.Read() { ... if(dataReceived.WaitOne(50, false)) //FAILS HERE I tried playing with the various timings in the code but I never succeeded in getting the Read method to pass. Any help would be appreciated. Thanks.




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.