Hi,
I'm tinkering with the DHT11 humidity/temperature sensor and trying to figure out why it sometimes works, and other times doesn't.
Anyhow, in my musings, I suddenly asked myself "Why do all of the example sketches for DHT11 seem to use an analog pin for comms?" I tried using a digital pin, and it didn't seem to work, even though the only values being read were 'pin high' and 'pin low'. I've just checked in the DHT11 library Arduino Playground - DHT11Lib and noticed that it uses a digital pin for its I/O ...so it looks like both analog and digital pins should work ok.
So my question to the forum is this. Is there any difference between using an analog pin or a digital pin when measuring digital values (on, off)? I was wondering if there might be a difference in the time it takes the pins to transition from 0 to 1 or vice versa. Also, are there fundamental timing differences between a digitalRead() and an analogRead()? I guess the latter doesn't matter if you are reading them using low level code e.g. PINC & _BV(0) for analog pin 0 and PIND & _BV(7) for digital pin 7.
Does anyone have some thoughts on this?