DHT11/ DHT22 / aosong AM2303 humidity sensor [SOLV

A humidity sensor for about $12? (plus sensible p&p, 7/10) Uses one i/o line? Works without libraries? Would work without shield? How cool!

Newly re-written software for accessing the sensor available at....

http://sheepdogguides.com/arduino/ar3ne1humDHT11.htm

New version does without obsure bit bashing and direct register accesses.

I've just used your code on an ATMega1280 (Arduino Mega) and found I needed to make a minor change to get the sensor working. Specifically I needed to disable one of the delays while waiting for the DHT11 to drop the line following the initialisation.

Note sure why yet - but it works reliably. The line in red was changed to make it work on the Mega: [color=#00ff00] //Next: Change Arduino pin to an input, to //watch for the 80us low explained a moment ago. [/color]pinMode(dht_dpin,INPUT);//Was: DDRC &= ~_BV(dht_PIN); //delayMicroseconds(40); Thanks for the initial script.