Pages: [1]   Go Down
Author Topic: Re: digitalRead on Analog pins aways return same value  (Read 305 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to read analog pin 2 as a digital pin you should read digital pin 15. Digital pin 14 is analog pin 1, digital pin 15 is analog pin 2, etc.

--
Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very close :-)
Analog pin 0 ist digital pin 14 e.t.c.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oops! Correct: 14 is 0, 15 is 1, etc.

--
Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html
Logged

Pages: [1]   Go Up
Jump to: