The Arduino programming environment is bootstrapped with many preprocessor definition contant values, specifically created to make the programming experience more accessible to non-programmers. Some specific examples include:
- Analog Pins:
A0
: 14A1
: 15
- Modes:
INPUT
: 0OUTPUT
: 1
- Values:
HIGH
: 1LOW
: 0
Please post thoughts in the comments. I'd like to flesh out the lists below before making a decision.
- Easily memorized by users
- Increased accessibility for those familiar with Arduino IDE programming
- Potentially reduce user code errors (?)
- Global scope pollution
@WebReflection, when using Firmata from a client (J5 in this case) you do not know which board you are dealing with until you query it. At least with the way Firmata currently works (I know because I am the maintainer of the Firmata library). Obviously you could assign values to A0, A1, etc once the query returns and you have the mapping. This is Firmata-specific. You would not have this issue when using J5 with board-specific plugins.