Pages: 1 [2]   Go Down
Author Topic: analog reference  (Read 1526 times)
0 Members and 1 Guest are viewing this topic.
Manchester, NH
Offline Offline
Full Member
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

> ...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)?

Pages: 1 [2]   Go Up
Jump to: