Skip to content

Reference missing mention of constants A0, A1, ... #785

Open
@NeatNit

Description

@NeatNit

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions