Go Down

Topic: analog reference (Read 5542 times) previous topic - next topic


> ...checking input from sensor on analog pin.
>val1 = digitalRead(inputPin1);

You're checking an analog pin with a digitalRead? Am I missing something... shouldn't it be an analogRead?

Also, if indeed using digitalRead, shouldn't you define the pin as an input with pinMode(inputPin1, INPUT)?

Go Up