I have a raspberry pi running pipgio and am using the provided code under the python section to get the temperature and humidity reading from the AM2302 (http://www.adafruit.com/products/393). If I connect: Pi <--> breadboard wires <--> AM2302 it will work fine. However that means the sensor has to be 6 inches away from the pi. I really need the sensor about 3 feet away from the pi so it is in a good location to get temperature and humidity. So I connected it like: Pi <--> breadboard wires <--> alarm wire similar gauge to breadboard wires <--> AM2302 and I only get -999 back. In both cases I am connecting to GPIO 17 and using the 3.3 volts to power the sensor.
3.3V ----- Red wire
Ground ----- Black wire
GPIO 17 ----- Yellow wire
So the question is two-fold:
1. Is the alarm wire type causing issues? If so what is the recommended wire to use for this scenerio?
2. Is using the 3.3v over a longer distance causing the issue? If so, can I use 5v to solve the issue? The datasheet (http://www.adafruit.com/datasheets/Digital%20humidity%20and%20temperature%20sensor%20AM2302.pdf) says it can accept 3.3 - 5.5v. However, the script says to connect to 5v the below is required but use at your own risk. Is this the best way to connect through 5v? I am not understanding why all that is necessary if the sensor accepts 5v (unless because the pi gpio is not 5v?)
5V--5K_resistor--+--10K_resistor--Ground
|
DHT22 pin 2 -----+
|
gpio ------------+