Integer Values for analogRead


Continuing the discussion from Analog pins 7 and up not available in 0.7.2 UPDATED [SOLVED]:

Hopefully its not annoying to recreate an old post this way. (I replied there as well).

In the referenced post @Erik showed a little table that included integer values for the analog pins on the Dash. I hadn’t seen that anywhere else and wanted to confirm that I can use those integer values in an analog read, like: analogRead(18); is = analogRead(A02);



You are correct, A02 maps to pin number 18. I would suggest that you use the the pin names from the Operating Manual over the raw integer values. For example, you can refer to that pin as R09, D07, A1 or A02, as they all map to 18.

I don’t have plans to change the underlying integer number for pins, but they are not guaranteed to be the same going forward. Using the defined symbols will be supported.


OK, thanks. Not a big deal either way I suppose, I just prefer passing the int value vs char/string.

Thanks for the info.