reference-en
reference-en copied to clipboard
Reference missing mention of constants A0, A1, ...
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:
pin: the number of the analog input pin to read from (0 to 5 on most boards, 0 to 7 on the Mini and Nano, 0 to 15 on the Mega)
So which is it? Is the reference page plain wrong, or are A0 and 0 equivalent for analogRead?
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.