Go Down

Topic: analog reference (Read 1 time) previous topic - next topic

rickso234

> ...checking input from sensor on analog pin.
yet
>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