Go Down

Topic: analog reference (Read 2044 times) 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy