Go Down

Topic: analog reference (Read 2288 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