DHT22 signal pin

Hello all,

Another question for my current project.
I'm using the DHT22 to detect temp and humidity in a terrarium for my auto climate system. Using examples online, I got it to work using the OneWire library. I was curious though as to why it doesn't work when using pin 0 or 1. Can anyone shed any light on this? I'm using the Arduino UNO, plan on using a Sainsmart LCD screen (for basic display), DHT22 for temp/humidity readings, 4-channel relay to trigger devices according to sensor reading, and three dimming signals for light. I'm pushing my pin capacity, and in my original schematic I had my sensor on pin 1. For whatever reason, it won't work on 0 or 1 like I already said, and I was curious as to why and are they strictly reserved for another function?



0 and 1 are reserved (usually) for communications with USB / computer to upload sketches etc.

DHT22 is NOT 1-wire. It has a different protocol. See: http://arduino-info.wikispaces.com/PROJECT-Temp-Humidity-Display

Rob Tillart's libraries for DHTnn are here: Arduino Playground - DHTLib

I got it to work using the OneWire library.

Can you post that code, I like to see how you did it.

Ok, so now I feel kinda dumb... I got mixed up with the OneWire library and the DHT22 library. I used the example that came with the latter... So in other words, I never did actually code with the OneWire library, I apparently just dreamt about it. Sorry for the confusion. Regardless, if the 0 and 1 pins are reserved for the usb, can they be used at all? Or should I just leave them alone? I'm wondering if I can move a simple relay signal to there so the sensor can go somewhere else.

you can use pin 0 and 1 but you should disconnect them when uploading a sketch otherwise you might get interference.