DHT22 Temperature Sensor

Hi,

I bought a DHT22 sensor (Humidity and Temperature Sensor - DHT20 - SEN-18364 - SparkFun Electronics ) . I got also a library for reading data from here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295252628 . Can anyone explain me why I need a 4.7kOhm resistor? Is itfor data accuracy and not for hardware?

Anyway if I want to use the resistor btw data pin and Vcc do I just need to make a bridge btw them?

see pic

simpledia.jpg

It''s for hardware funtionality. The single data line has to be bidirectional. That means the I/O pins on both ends of the single wire signal have to sometimes be input pins and sometimes output pins. By having a pull-up resistor wired to Vcc, then there will always be a valid logic level on the wire as pins switch modes.

It's the same reqirement needed for the clock and data lines on any I2C device wiring to an arduino.

PS: your example drawing figures 2 and 3 are electrical the same, aren't they? Anyway just wire the resistor between the voltage and the signal wire anywhere along the run or at either end.
Lefty

something like this? of course the resistor is not the correct one...but it just an example..

image201103010001.jpg

Should work fine.