Open NeatNit opened 7 years ago
analogRead
supports two argument values: The analog channel number (0-something), or the pin number (e.g. 14+ on a Uno) that can also be passed to digitalWrite
. Does that clarify?
Yes, thank you... though pert has already clarified this on the forum.
not in analogRead.
This issue was fixed by https://github.com/arduino/reference-en/pull/463
the analog input pin constants are not mentioned in the Arduino reference - not under Constants
This issue remains.
As I mentioned along with some other stuff on the forum, the analog input pin constants are not mentioned in the Arduino reference - not under Constants and not in analogRead.
But actually, I'm unclear on how they are used. I have an Uno and the constant A0 has the value 14. The example AnalogReadSerial uses this constant to read the value:
int sensorValue = analogRead(A0);
However, the analogRead reference page says:So which is it? Is the reference page plain wrong, or are A0 and 0 equivalent for analogRead?