Hi all,
I've just got my arduino and am very happy with it. I'm not really a hardware guy so it's nice to have something easy-to-use that I can understand!
I've discovered a problem though. It seems that if you do a digitalRead() from a PWM pin (9, 10, or 11) configured as input, the second and subsequent digitalRead()s will always return HIGH, until the signal on the pin actually changes.
That is:
1 h = digitalRead(10); /* h gets correct value /
2 h = digitalRead(10); / h is HIGH regardless of value /
3 / Signal changes from LOW to HIGH or vice versa /
4 h = digitalRead(10); / h once again gets correct value*/
This wouldn't be a problem except that sometimes I get spurious HIGH values in line 1: ie h gets HIGH regardless.
If I move the input to one of the other pins (not PWM), everything works fine.
Has anyone else experienced this problem?