Developers Archive

List Statistics

  • Total Threads: 675
  • Total Posts: 2049
  #1  
07-05-2010 05:23 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #2  
07-05-2010 05:48 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #3  
07-05-2010 07:44 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #4  
08-05-2010 01:45 AM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #5  
08-05-2010 02:19 AM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #6  
08-05-2010 02:31 AM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #7  
08-05-2010 10:06 AM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #8  
08-05-2010 05:58 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #9  
08-05-2010 07:28 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #10  
08-05-2010 07:28 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #11  
08-05-2010 09:21 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #12  
09-05-2010 07:07 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #13  
15-05-2010 04:42 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #14  
17-05-2010 05:35 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. >


>On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>
>>>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>>Agreed.
>>
>>IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>eventually shifting to just 14, 15, ...
>>
>>Leah
>
>
Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A

Where the letter indicates the primary specialized function

Key:

R RX
T Tx
P PWM
A Analog

There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #15  
17-05-2010 06:20 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. >


>On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>
>>>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>>Agreed.
>>
>>IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>eventually shifting to just 14, 15, ...
>>
>>Leah
>
>
Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A

Where the letter indicates the primary specialized function

Key:

R RX
T Tx
P PWM
A Analog

There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram

t.

On May 17, 2010, at 12:35 PM, Adrian Freed wrote:

>>
>
>
>> On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>>
>>>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>>
>>> Agreed.
>>>
>>> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>> eventually shifting to just 14, 15, ...
>>>
>>> Leah
>>
>>
> Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A
>
> Where the letter indicates the primary specialized function
>
> Key:
>
> R RX
> T Tx
> P PWM
> A Analog
>
> There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
> The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #16  
18-05-2010 04:52 AM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. >


>On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>
>>>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>>Agreed.
>>
>>IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>eventually shifting to just 14, 15, ...
>>
>>Leah
>
>
Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A

Where the letter indicates the primary specialized function

Key:

R RX
T Tx
P PWM
A Analog

There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram

t.

On May 17, 2010, at 12:35 PM, Adrian Freed wrote:

>>
>
>
>> On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>>
>>>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>>
>>> Agreed.
>>>
>>> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>> eventually shifting to just 14, 15, ...
>>>
>>> Leah
>>
>>
> Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A
>
> Where the letter indicates the primary specialized function
>
> Key:
>
> R RX
> T Tx
> P PWM
> A Analog
>
> There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
> The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
Numbers are meaningless symbols - add a few letters in and they have mnemonic
value. I wont bore you with an argument because OSC already makes this case.
The recommended practice in OSC is to use addresses that correspond to exactly
what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
This also means you never have to know that analog pins start at 14 on some
boards and 54 on others and many applications will be portable across boards.


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #17  
18-05-2010 07:50 AM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. >


>On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>
>>>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>>Agreed.
>>
>>IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>eventually shifting to just 14, 15, ...
>>
>>Leah
>
>
Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A

Where the letter indicates the primary specialized function

Key:

R RX
T Tx
P PWM
A Analog

There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram

t.

On May 17, 2010, at 12:35 PM, Adrian Freed wrote:

>>
>
>
>> On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>>
>>>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>>
>>> Agreed.
>>>
>>> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>> eventually shifting to just 14, 15, ...
>>>
>>> Leah
>>
>>
> Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A
>
> Where the letter indicates the primary specialized function
>
> Key:
>
> R RX
> T Tx
> P PWM
> A Analog
>
> There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
> The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
Numbers are meaningless symbols - add a few letters in and they have mnemonic
value. I wont bore you with an argument because OSC already makes this case.
The recommended practice in OSC is to use addresses that correspond to exactly
what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
This also means you never have to know that analog pins start at 14 on some
boards and 54 on others and many applications will be portable across boards.


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. A huge DITTO.

I know space is tight on toards but they should include as much info
as possible about how you can use each pin. That means its digital I/O
pin #, and at least its primary alternate function. All alternate
functions would be nice. If necessary, use Adrians prefix idea. So,
for example, for the Duemilanove:
0 Rx
1 Tx
2 I0
3 P0 I1
4
5 P1
6 P2
7
8
9 P3
10 P4 SS
11 P5 SI
12 SO
13 CK
14 A0
15 A1
16 A2
17 A3
18 A4 SD
19 A5 SC
All functions should take the digital pin numbers. But there should be
aliases for each alternate function:
const byte Rx = 0;
const byte Tx = 1;
const byte I0 = 2;
const byte I1 = 3;
const byte P0 = 3;
const byte P1 = 5;
const byte P2 = 6;
const byte P3 = 9;
const byte P4 = 10;
const byte P5 = 11;
const byte SS = 10;
const byte SI = 11;
const byte CK = 12;
const byte A0 = 14;
const byte A1 = 15;
const byte A2 = 16;
const byte A3 = 17;
const byte A4 = 18;
const byte A5 = 19;
Now if someone writes:
int value = analogRead(A0);
analogWrite(P3, 255);
it has a better chance of working on multiple boards, where the chips
special functions are on different pins.

Initally, you need only make the changes to the silkscreen. The
software changes can come later.

giuliano

On May 17, 2010, at 8:52 PM, Adrian Freed wrote:

> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>> I think any numbering scheme that needs a key to explain it is
>> probably more complex than we should do. I'd rather go with
>> phasing out the A0 in favor of numbers. I like the mBed diagram
> Numbers are meaningless symbols - add a few letters in and they
> have mnemonic
> value. I wont bore you with an argument because OSC already makes
> this case.
> The recommended practice in OSC is to use addresses that correspond
> to exactly
> what is on the PCB silkscreen. There is then no documentation to
> look up or synchronize and no need to explain to beginners any
> arbitrary numerical sequences.
> This also means you never have to know that analog pins start at 14
> on some
> boards and 54 on others and many applications will be portable
> across boards.
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #18  
18-05-2010 01:51 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. >


>On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>
>>>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>>Agreed.
>>
>>IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>eventually shifting to just 14, 15, ...
>>
>>Leah
>
>
Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A

Where the letter indicates the primary specialized function

Key:

R RX
T Tx
P PWM
A Analog

There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram

t.

On May 17, 2010, at 12:35 PM, Adrian Freed wrote:

>>
>
>
>> On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>>
>>>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>>
>>> Agreed.
>>>
>>> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>> eventually shifting to just 14, 15, ...
>>>
>>> Leah
>>
>>
> Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A
>
> Where the letter indicates the primary specialized function
>
> Key:
>
> R RX
> T Tx
> P PWM
> A Analog
>
> There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
> The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
Numbers are meaningless symbols - add a few letters in and they have mnemonic
value. I wont bore you with an argument because OSC already makes this case.
The recommended practice in OSC is to use addresses that correspond to exactly
what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
This also means you never have to know that analog pins start at 14 on some
boards and 54 on others and many applications will be portable across boards.


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. A huge DITTO.

I know space is tight on toards but they should include as much info
as possible about how you can use each pin. That means its digital I/O
pin #, and at least its primary alternate function. All alternate
functions would be nice. If necessary, use Adrians prefix idea. So,
for example, for the Duemilanove:
0 Rx
1 Tx
2 I0
3 P0 I1
4
5 P1
6 P2
7
8
9 P3
10 P4 SS
11 P5 SI
12 SO
13 CK
14 A0
15 A1
16 A2
17 A3
18 A4 SD
19 A5 SC
All functions should take the digital pin numbers. But there should be
aliases for each alternate function:
const byte Rx = 0;
const byte Tx = 1;
const byte I0 = 2;
const byte I1 = 3;
const byte P0 = 3;
const byte P1 = 5;
const byte P2 = 6;
const byte P3 = 9;
const byte P4 = 10;
const byte P5 = 11;
const byte SS = 10;
const byte SI = 11;
const byte CK = 12;
const byte A0 = 14;
const byte A1 = 15;
const byte A2 = 16;
const byte A3 = 17;
const byte A4 = 18;
const byte A5 = 19;
Now if someone writes:
int value = analogRead(A0);
analogWrite(P3, 255);
it has a better chance of working on multiple boards, where the chips
special functions are on different pins.

Initally, you need only make the changes to the silkscreen. The
software changes can come later.

giuliano

On May 17, 2010, at 8:52 PM, Adrian Freed wrote:

> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>> I think any numbering scheme that needs a key to explain it is
>> probably more complex than we should do. I'd rather go with
>> phasing out the A0 in favor of numbers. I like the mBed diagram
> Numbers are meaningless symbols - add a few letters in and they
> have mnemonic
> value. I wont bore you with an argument because OSC already makes
> this case.
> The recommended practice in OSC is to use addresses that correspond
> to exactly
> what is on the PCB silkscreen. There is then no documentation to
> look up or synchronize and no need to explain to beginners any
> arbitrary numerical sequences.
> This also means you never have to know that analog pins start at 14
> on some
> boards and 54 on others and many applications will be portable
> across boards.
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. Hi,

I think we're sticking with numbers as the primary labels for the digital pins and standardizing on A0, A1, etc. as the primary labels for the analog input pins. To me, then, it makes sense to use these labels in the software, too.

I can certainly see the argument for including more information on the boards. Labeling the interrupts, the SPI, and the I2C pins in particular could be useful. We already label the PWM pins, although I'm not sure they need individual numbers. In any case, the existing system of using numbers for these pins in the software seems to work (e.g. analogWrite(9)), I don't really see the need for aliases for those, at least with the intention of helping beginners and clarifying the examples. It might make sense for cross-board compatibility reasons, but again, that feels like a larger issue.

David

On May 18, 2010, at 2:50 AM, giuliano carlini wrote:

> A huge DITTO.
>
> I know space is tight on toards but they should include as much info as possible about how you can use each pin. That means its digital I/O pin #, and at least its primary alternate function. All alternate functions would be nice. If necessary, use Adrians prefix idea. So, for example, for the Duemilanove:
> 0 Rx
> 1 Tx
> 2 I0
> 3 P0 I1
> 4
> 5 P1
> 6 P2
> 7
> 8
> 9 P3
> 10 P4 SS
> 11 P5 SI
> 12 SO
> 13 CK
> 14 A0
> 15 A1
> 16 A2
> 17 A3
> 18 A4 SD
> 19 A5 SC
> All functions should take the digital pin numbers. But there should be aliases for each alternate function:
> const byte Rx = 0;
> const byte Tx = 1;
> const byte I0 = 2;
> const byte I1 = 3;
> const byte P0 = 3;
> const byte P1 = 5;
> const byte P2 = 6;
> const byte P3 = 9;
> const byte P4 = 10;
> const byte P5 = 11;
> const byte SS = 10;
> const byte SI = 11;
> const byte CK = 12;
> const byte A0 = 14;
> const byte A1 = 15;
> const byte A2 = 16;
> const byte A3 = 17;
> const byte A4 = 18;
> const byte A5 = 19;
> Now if someone writes:
> int value = analogRead(A0);
> analogWrite(P3, 255);
> it has a better chance of working on multiple boards, where the chips special functions are on different pins.
>
> Initally, you need only make the changes to the silkscreen. The software changes can come later.
>
> giuliano
>
> On May 17, 2010, at 8:52 PM, Adrian Freed wrote:
>
>> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>>> I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
>> Numbers are meaningless symbols - add a few letters in and they have mnemonic
>> value. I wont bore you with an argument because OSC already makes this case.
>> The recommended practice in OSC is to use addresses that correspond to exactly
>> what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
>> This also means you never have to know that analog pins start at 14 on some
>> boards and 54 on others and many applications will be portable across boards.
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #19  
18-05-2010 04:03 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. >


>On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>
>>>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>>Agreed.
>>
>>IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>eventually shifting to just 14, 15, ...
>>
>>Leah
>
>
Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A

Where the letter indicates the primary specialized function

Key:

R RX
T Tx
P PWM
A Analog

There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram

t.

On May 17, 2010, at 12:35 PM, Adrian Freed wrote:

>>
>
>
>> On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>>
>>>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>>
>>> Agreed.
>>>
>>> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>> eventually shifting to just 14, 15, ...
>>>
>>> Leah
>>
>>
> Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A
>
> Where the letter indicates the primary specialized function
>
> Key:
>
> R RX
> T Tx
> P PWM
> A Analog
>
> There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
> The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
Numbers are meaningless symbols - add a few letters in and they have mnemonic
value. I wont bore you with an argument because OSC already makes this case.
The recommended practice in OSC is to use addresses that correspond to exactly
what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
This also means you never have to know that analog pins start at 14 on some
boards and 54 on others and many applications will be portable across boards.


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. A huge DITTO.

I know space is tight on toards but they should include as much info
as possible about how you can use each pin. That means its digital I/O
pin #, and at least its primary alternate function. All alternate
functions would be nice. If necessary, use Adrians prefix idea. So,
for example, for the Duemilanove:
0 Rx
1 Tx
2 I0
3 P0 I1
4
5 P1
6 P2
7
8
9 P3
10 P4 SS
11 P5 SI
12 SO
13 CK
14 A0
15 A1
16 A2
17 A3
18 A4 SD
19 A5 SC
All functions should take the digital pin numbers. But there should be
aliases for each alternate function:
const byte Rx = 0;
const byte Tx = 1;
const byte I0 = 2;
const byte I1 = 3;
const byte P0 = 3;
const byte P1 = 5;
const byte P2 = 6;
const byte P3 = 9;
const byte P4 = 10;
const byte P5 = 11;
const byte SS = 10;
const byte SI = 11;
const byte CK = 12;
const byte A0 = 14;
const byte A1 = 15;
const byte A2 = 16;
const byte A3 = 17;
const byte A4 = 18;
const byte A5 = 19;
Now if someone writes:
int value = analogRead(A0);
analogWrite(P3, 255);
it has a better chance of working on multiple boards, where the chips
special functions are on different pins.

Initally, you need only make the changes to the silkscreen. The
software changes can come later.

giuliano

On May 17, 2010, at 8:52 PM, Adrian Freed wrote:

> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>> I think any numbering scheme that needs a key to explain it is
>> probably more complex than we should do. I'd rather go with
>> phasing out the A0 in favor of numbers. I like the mBed diagram
> Numbers are meaningless symbols - add a few letters in and they
> have mnemonic
> value. I wont bore you with an argument because OSC already makes
> this case.
> The recommended practice in OSC is to use addresses that correspond
> to exactly
> what is on the PCB silkscreen. There is then no documentation to
> look up or synchronize and no need to explain to beginners any
> arbitrary numerical sequences.
> This also means you never have to know that analog pins start at 14
> on some
> boards and 54 on others and many applications will be portable
> across boards.
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. Hi,

I think we're sticking with numbers as the primary labels for the digital pins and standardizing on A0, A1, etc. as the primary labels for the analog input pins. To me, then, it makes sense to use these labels in the software, too.

I can certainly see the argument for including more information on the boards. Labeling the interrupts, the SPI, and the I2C pins in particular could be useful. We already label the PWM pins, although I'm not sure they need individual numbers. In any case, the existing system of using numbers for these pins in the software seems to work (e.g. analogWrite(9)), I don't really see the need for aliases for those, at least with the intention of helping beginners and clarifying the examples. It might make sense for cross-board compatibility reasons, but again, that feels like a larger issue.

David

On May 18, 2010, at 2:50 AM, giuliano carlini wrote:

> A huge DITTO.
>
> I know space is tight on toards but they should include as much info as possible about how you can use each pin. That means its digital I/O pin #, and at least its primary alternate function. All alternate functions would be nice. If necessary, use Adrians prefix idea. So, for example, for the Duemilanove:
> 0 Rx
> 1 Tx
> 2 I0
> 3 P0 I1
> 4
> 5 P1
> 6 P2
> 7
> 8
> 9 P3
> 10 P4 SS
> 11 P5 SI
> 12 SO
> 13 CK
> 14 A0
> 15 A1
> 16 A2
> 17 A3
> 18 A4 SD
> 19 A5 SC
> All functions should take the digital pin numbers. But there should be aliases for each alternate function:
> const byte Rx = 0;
> const byte Tx = 1;
> const byte I0 = 2;
> const byte I1 = 3;
> const byte P0 = 3;
> const byte P1 = 5;
> const byte P2 = 6;
> const byte P3 = 9;
> const byte P4 = 10;
> const byte P5 = 11;
> const byte SS = 10;
> const byte SI = 11;
> const byte CK = 12;
> const byte A0 = 14;
> const byte A1 = 15;
> const byte A2 = 16;
> const byte A3 = 17;
> const byte A4 = 18;
> const byte A5 = 19;
> Now if someone writes:
> int value = analogRead(A0);
> analogWrite(P3, 255);
> it has a better chance of working on multiple boards, where the chips special functions are on different pins.
>
> Initally, you need only make the changes to the silkscreen. The software changes can come later.
>
> giuliano
>
> On May 17, 2010, at 8:52 PM, Adrian Freed wrote:
>
>> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>>> I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
>> Numbers are meaningless symbols - add a few letters in and they have mnemonic
>> value. I wont bore you with an argument because OSC already makes this case.
>> The recommended practice in OSC is to use addresses that correspond to exactly
>> what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
>> This also means you never have to know that analog pins start at 14 on some
>> boards and 54 on others and many applications will be portable across boards.
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > In any case, the existing system of using numbers for these pins in the software seems to work (e.g. analogWrite(9)), I don't really see the need for aliases for those, at least with the intention of helping beginners and clarifying the examples. It might make sense for cross-board compatibility reasons, but again, that feels like a larger issue.
>

A few months ago, I worked on a hardware abstraction layer for Firmata
which makes it compatible with nearly any board, including Arduino
Mega. Currently this code is in a branch on Firmata's svn, but
hopefully will merge soon.

Firmata needs more info about the hardware than is available from the
core's header files. Any program that wants to do generic I/O would as
well.

The simplest requirement is knowing how many pins exist. This can't be
fully detected by only the CPU type. For example, a Duemilanove has 20
pins, but a Mini with the same CPU has 22 pins, because there are 2
extra analog pins. Hopefully someday Compiler.java can pass a
-Dboardname to gcc, which is definable from boards.txt, and headers in
the core can define a symbol that tells the proper number of pins for
the actual board selected in the Tools->Boards menu? Another simple
requirement was knowing which pin the LED is connected to, if there is
any LED on the board at all.

Also important is a way to know if any specific pin supports a
particular feature. In Firmata, I created a header called Boards.h
which attempts to define this for many known boards, admittedly clumsily
based on the CPU type, because that's the only information available
today. For example, the macro IS_PIN_ANALOG() returns true if a pin
works with analogRead(). IS_PIN_PWM() returns true if analogWrite()
will work, and IS_PIN_DIGITAL() is true if pinMode(), digitalWrite() and
digitalRead() work. The IS_PIN_DIGITAL() check might see silly, but
those extra 2 analog pins on the Mini (or any board with the TQFP chip)
do not implement digital I/O, only analog input. Really, this is pretty
simple stuff, other than the hazard of making the assumptions based only
on the CPU type symbol automatically defined by the compiler.

I realize hardware abstraction can feel like a hugely insurmountable
task to even just think about. Indeed fully abstracting every possible
detail would be. But a lot of what's needed by real applications like
Firmata are pretty simple symbols and macros. Maybe it's time to
incorporate even some simple symbols and macros in the core's headers to
express what I/O capabilities the user's board actually implements?


-Paul


ps: I believe the patch to Compiler.java to support this would only
require a this 1 line, added in getCommandCompilerS,
getCommandCompilerC, and getCommandCompilerCPP:

"-D" + boardPreferences.get("build.header_name"),

Each entry in boards.txt would need to define this, and then the core's
headers could do #ifdef checks based on the known names, and define true
board-specific symbols like the total number of pins.


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.

  #20  
18-05-2010 08:20 PM
Developers member admin is online now
User
 

I will be glad to see this (aliases), it's one of those things that
are always are tripping up my students.

What would make even more sense, eventually, is to just deprecate the
analog numbers entirely, and just have one set of unambiguous pin numbers.
Eliminating what is a needlessly confusing distinction, for example,
the pwm, interrupt, I2C, SPI, and serial pins do not have their own
pin numbers.

Then users could just check a pin map for their chip, for the
hardware on the pin, and get going with the code.

Paul


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 11:23 AM -0500 5/7/10, Paul Badger wrote:
>I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
>Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>

Hear, Hear!

I expect eventually microcontrollers will be made where every pin can have any function (like many FPGA's) but until then we need to master mapping. Currently we burden beginners
with having to remember or lookup these maps for particular chips in sometimes obscure corners
of the documentation instead of close to where they are working (in the IDE).


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.

Yes! I'd love to see a single set of numbers. But, with aliases, so 1)
folks don't have to check the pin map for their chip as often and 2)
the same identical code is more likely to work on different chips.
PWM_1-PWM_N, SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.

I would prefer if the interrupt numbers were just their pin numbers.
That's how I've set up the xmega port. Don't know if aliases make
sense for them.

Again, transitioning is troublesome. I'm trying to figure out how to
use C++ namespaces to make this easier. To use the "old" API, the user
need do nothing. To use the new API, the user need only add:
using ArduinoApi_v2;
The preprocessor scans the sketch and if it sees no "using" statement,
adds "using ArduinoApi_v1;" I'd like to make it even simpler than
this, but namespace semantics are fighting me.

giuliano

On May 7, 2010, at 9:23 AM, Paul Badger wrote:

> I will be glad to see this (aliases), it's one of those things that
> are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate
> the analog numbers entirely, and just have one set of unambiguous
> pin numbers.
> Eliminating what is a needlessly confusing distinction, for example,
> the pwm, interrupt, I2C, SPI, and serial pins do not have their own
> pin numbers.
>
> Then users could just check a pin map for their chip, for the
> hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.

Agreed.

IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ... eventually shifting to just 14, 15, ...

Leah


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On 8 May 2010 06:44, giuliano carlini <> wrote:
>> What would make even more sense, eventually, is to just deprecate the
>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
> don't have to check the pin map for their chip as often and 2) the same
> identical code is more likely to work on different chips. PWM_1-PWM_N,
> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
I think this highlights the main issue we have here.

As I see it we have at least three main options mentioned (so far):

* Maintain standard numbering for some or all pins: 0, 1, 2, 3
* Use aliases in some form for some or all pins: A0, PWM1 etc
* Use of function specific numbering: analogRead(0) etc
* Use generic numbering with specific functions. analogRead(14) etc

One of the complicating matters is that (even now, with just
considering 328 & 1280 use) is the issue of compatibility between pin
numbering and functionality.

In terms of non-technical people I suspect that a bunch of
functionality-based acronym-laden aliases is not going to present a
particularly welcoming image. And functionally, it seems no different
to having a compile time look-up in a functionality-specific table.

--Philip;

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think it is less confusing for beginners if some indication of
analog or digital is given in any aliasing.
-Jen


On Fri, May 7, 2010 at 9:19 PM, follower <> wrote:
> On 8 May 2010 06:44, giuliano carlini <> wrote:
>>> What would make even more sense, eventually, is to just deprecate the
>>> analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>> Yes! I'd love to see a single set of numbers. But, with aliases, so 1) folks
>> don't have to check the pin map for their chip as often and 2) the same
>> identical code is more likely to work on different chips. PWM_1-PWM_N,
>> SCA_1-SCA_N, SDA_1-SDA_N, MISO_1-MISO_N, etc.
> I think this highlights the main issue we have here.
>
> As I see it we have at least three main options mentioned (so far):
>
>  * Maintain standard numbering for some or all pins: 0, 1, 2, 3
>  * Use aliases in some form for some or all pins: A0, PWM1 etc
>  * Use of function specific numbering: analogRead(0) etc
>  * Use generic numbering with specific functions. analogRead(14) etc
>
> One of the complicating matters is that (even now, with just
> considering 328 & 1280 use) is the issue of compatibility between pin
> numbering and functionality.
>
> In terms of non-technical people I suspect that a bunch of
> functionality-based acronym-laden aliases is not going to present a
> particularly welcoming image. And functionally, it seems no different
> to having a compile time look-up in a functionality-specific table.
>
> --Philip;
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. We could use new code instead of new pin names so pwmWrite for the pwm pins and analogWrite for the analog pins ie

pwmWrite(0,255) only writes to the digital pwm pin 0

analogWrite(0,255) only writes to the analog pin 0

PWM pins are always labeled so beginners dont have to check the pin aliases of their board

James

On 7 May 2010, at 17:23, Paul Badger <> wrote:

> I will be glad to see this (aliases), it's one of those things that are always are tripping up my students.
>
> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
> Eliminating what is a needlessly confusing distinction, for example, the pwm, interrupt, I2C, SPI, and serial pins do not have their own pin numbers.
>
> Then users could just check a pin map for their chip, for the hardware on the pin, and get going with the code.
>
> Paul
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. There are a couple of related issues here.

I'll add support to analogRead() for pin numbers 14, 15, etc. That's
necessary whether we want to use those numbers directly or aliases for
them.

I'd also like to add the aliases A0, A1, etc. This fits the existing
hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
already use this notation and it's similar to the numbers on the
Duemilanove and Mega, too.

I'm asking the rest of the team what they think about the longer-term
labeling of the boards. It seems like a bigger change to switch the
analog input pin numbers to 14, 15, etc.

David

On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
<> wrote:
>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...  eventually shifting to just 14, 15, ...
>
> Leah
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. If possible, the boards should be labeled with their "digital" pin
number, and their special function label(s). I know board real estate
is tight, but it would be make things easier. I mostly managed it on
the board I designed so I think it should be possible.

So, for the duemilanove, I'd suggest:
0 Rx
1 Tx
2 INT_0
3 PWM_0 INT_1
4
5 PWM_1
6 PWM_2
7
8
9 PWM_3
10 PWM_4 SS
11 PWM_5 MOSI
12 MISO
13 SCK
14 A0
15 A1
16 A2
17 A3
18 A4 SDA
19 A5 SCL
For boards with multiple serial ports, I'd suggest Rx, Tx, Rx_1, Tx_1,
Rx_2, Tx_2, ...
For boards with multiple SPI ports, SS_1, MOSI_1, MISO_1, SCK_1, ...
Ditto other special purposes. I like the underscores rather than
jamming everything together. Though we should stick with Rx, Tx, and
A0, A1, ... for compatibility.

Just my 2 bits.

giuliano

On May 8, 2010, at 9:58 AM, David A. Mellis wrote:

> There are a couple of related issues here.
>
> I'll add support to analogRead() for pin numbers 14, 15, etc. That's
> necessary whether we want to use those numbers directly or aliases for
> them.
>
> I'd also like to add the aliases A0, A1, etc. This fits the existing
> hardware well: the Mini Pro, Nano, Fio, and (in lowercase) the LilyPad
> already use this notation and it's similar to the numbers on the
> Duemilanove and Mega, too.
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards. It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.
>
> David
>
> On Fri, May 7, 2010 at 8:45 PM, Leah Buechley
> <> wrote:
>>> What would make even more sense, eventually, is to just deprecate
>>> the analog numbers entirely, and just have one set of unambiguous
>>> pin numbers.
>>
>> Agreed.
>>
>> IMHO it makes most sense to move towards abandoning the A0, A1,
>> etc. notation & to shift people toward using 14, 15, 16...
>> Preferred intermediate board labeling for me would be A0/14,
>> A1/15, ... eventually shifting to just 14, 15, ...
>>
>> Leah
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>
> I'm asking the rest of the team what they think about the longer-term
> labeling of the boards.  It seems like a bigger change to switch the
> analog input pin numbers to 14, 15, etc.

As long as old code does not break, I'm glad to see that there is a
sensible short-term solution as well as a long term aim.

-- magnus

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. mbed have a good solution for labelling pins - a clear diagram on the
webpage with good use of colour to discriminate functions.

http://mbed.org/tour/#microcontroller

they also produce this on a card that is the right size so that you can hold
it agains the board to indicate which leg is which -particulalry useful for
small boards where space for labelling is not really available.

Have taken some pics so you can see.

http://drop.io/mbed_card

For the small arduino boards something like this would be great. For the the
Duemilanove a card could be just the right size to fit between the headers,
over the board.

Nick



> >
> > I'm asking the rest of the team what they think about the longer-term
> > labeling of the boards. It seems like a bigger change to switch the
> > analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I'll let the rest of the team chime in if they want, but it sounds as
though we're planning to stick with the separate numbering for the
analog input pins on the boards (i.e. not switching to 14, 15, 16,
etc.). This provides more consistency with the existing naming /
numbering scheme.

In the next software release (0019), I'll add the aliases A0, A1, etc.
They should make the analog input pins as easy to use for digital
input and output as the other pins: e.g. digitalRead(A0) and
digitalWrite(A0) will work as expected, and so will analogRead(A0).
Once these are in the software, we can make it clearer in the
documentation that the analog inputs are also usable as additional
digital pins.

David

On Sat, May 8, 2010 at 2:28 PM, Magnus Bodin <> wrote:
> On Sat, May 8, 2010 at 18:58, David A. Mellis <> wrote:
>>
>> I'm asking the rest of the team what they think about the longer-term
>> labeling of the boards.  It seems like a bigger change to switch the
>> analog input pin numbers to 14, 15, etc.
>
> As long as old code does not break, I'm glad to see that there is a
> sensible short-term solution as well as a long term aim.
>
> -- magnus
>

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. On May 7, 2010, at 5:45 PM, Leah Buechley wrote:

>> What would make even more sense, eventually, is to just deprecate
>> the analog numbers entirely, and just have one set of unambiguous
>> pin numbers.
>
> Agreed.
>
> IMHO it makes most sense to move towards abandoning the A0, A1, etc.
> notation & to shift people toward using 14, 15, 16... Preferred
> intermediate board labeling for me would be A0/14, A1/15, ...
> eventually shifting to just 14, 15, ...
>
> Leah

I totally agree.

.hc




----------------------------------------------------------------------------
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. >


>On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>
>>>What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>
>>Agreed.
>>
>>IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>eventually shifting to just 14, 15, ...
>>
>>Leah
>
>
Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A

Where the letter indicates the primary specialized function

Key:

R RX
T Tx
P PWM
A Analog

There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).

_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram

t.

On May 17, 2010, at 12:35 PM, Adrian Freed wrote:

>>
>
>
>> On May 7, 2010, at 5:45 PM, Leah Buechley wrote:
>>
>>>> What would make even more sense, eventually, is to just deprecate the analog numbers entirely, and just have one set of unambiguous pin numbers.
>>>
>>> Agreed.
>>>
>>> IMHO it makes most sense to move towards abandoning the A0, A1, etc. notation & to shift people toward using 14, 15, 16... Preferred intermediate board labeling for me would be A0/14, A1/15, ...
>>> eventually shifting to just 14, 15, ...
>>>
>>> Leah
>>
>>
> Or we could consider postfix hinting e.g., 0R, 1T, 2, 3P, 4, ..., 13L, 14A, 15A, 16A
>
> Where the letter indicates the primary specialized function
>
> Key:
>
> R RX
> T Tx
> P PWM
> A Analog
>
> There is an expanded version of this on the silkscreen of the Seeeduino Mega where there is enough room.
> The postfix I suggest is more compact for smaller format boards (of which there are increasingly many - my recent favorite: sippino).
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
Numbers are meaningless symbols - add a few letters in and they have mnemonic
value. I wont bore you with an argument because OSC already makes this case.
The recommended practice in OSC is to use addresses that correspond to exactly
what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
This also means you never have to know that analog pins start at 14 on some
boards and 54 on others and many applications will be portable across boards.


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. A huge DITTO.

I know space is tight on toards but they should include as much info
as possible about how you can use each pin. That means its digital I/O
pin #, and at least its primary alternate function. All alternate
functions would be nice. If necessary, use Adrians prefix idea. So,
for example, for the Duemilanove:
0 Rx
1 Tx
2 I0
3 P0 I1
4
5 P1
6 P2
7
8
9 P3
10 P4 SS
11 P5 SI
12 SO
13 CK
14 A0
15 A1
16 A2
17 A3
18 A4 SD
19 A5 SC
All functions should take the digital pin numbers. But there should be
aliases for each alternate function:
const byte Rx = 0;
const byte Tx = 1;
const byte I0 = 2;
const byte I1 = 3;
const byte P0 = 3;
const byte P1 = 5;
const byte P2 = 6;
const byte P3 = 9;
const byte P4 = 10;
const byte P5 = 11;
const byte SS = 10;
const byte SI = 11;
const byte CK = 12;
const byte A0 = 14;
const byte A1 = 15;
const byte A2 = 16;
const byte A3 = 17;
const byte A4 = 18;
const byte A5 = 19;
Now if someone writes:
int value = analogRead(A0);
analogWrite(P3, 255);
it has a better chance of working on multiple boards, where the chips
special functions are on different pins.

Initally, you need only make the changes to the silkscreen. The
software changes can come later.

giuliano

On May 17, 2010, at 8:52 PM, Adrian Freed wrote:

> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>> I think any numbering scheme that needs a key to explain it is
>> probably more complex than we should do. I'd rather go with
>> phasing out the A0 in favor of numbers. I like the mBed diagram
> Numbers are meaningless symbols - add a few letters in and they
> have mnemonic
> value. I wont bore you with an argument because OSC already makes
> this case.
> The recommended practice in OSC is to use addresses that correspond
> to exactly
> what is on the PCB silkscreen. There is then no documentation to
> look up or synchronize and no need to explain to beginners any
> arbitrary numerical sequences.
> This also means you never have to know that analog pins start at 14
> on some
> boards and 54 on others and many applications will be portable
> across boards.
>
>
> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. Hi,

I think we're sticking with numbers as the primary labels for the digital pins and standardizing on A0, A1, etc. as the primary labels for the analog input pins. To me, then, it makes sense to use these labels in the software, too.

I can certainly see the argument for including more information on the boards. Labeling the interrupts, the SPI, and the I2C pins in particular could be useful. We already label the PWM pins, although I'm not sure they need individual numbers. In any case, the existing system of using numbers for these pins in the software seems to work (e.g. analogWrite(9)), I don't really see the need for aliases for those, at least with the intention of helping beginners and clarifying the examples. It might make sense for cross-board compatibility reasons, but again, that feels like a larger issue.

David

On May 18, 2010, at 2:50 AM, giuliano carlini wrote:

> A huge DITTO.
>
> I know space is tight on toards but they should include as much info as possible about how you can use each pin. That means its digital I/O pin #, and at least its primary alternate function. All alternate functions would be nice. If necessary, use Adrians prefix idea. So, for example, for the Duemilanove:
> 0 Rx
> 1 Tx
> 2 I0
> 3 P0 I1
> 4
> 5 P1
> 6 P2
> 7
> 8
> 9 P3
> 10 P4 SS
> 11 P5 SI
> 12 SO
> 13 CK
> 14 A0
> 15 A1
> 16 A2
> 17 A3
> 18 A4 SD
> 19 A5 SC
> All functions should take the digital pin numbers. But there should be aliases for each alternate function:
> const byte Rx = 0;
> const byte Tx = 1;
> const byte I0 = 2;
> const byte I1 = 3;
> const byte P0 = 3;
> const byte P1 = 5;
> const byte P2 = 6;
> const byte P3 = 9;
> const byte P4 = 10;
> const byte P5 = 11;
> const byte SS = 10;
> const byte SI = 11;
> const byte CK = 12;
> const byte A0 = 14;
> const byte A1 = 15;
> const byte A2 = 16;
> const byte A3 = 17;
> const byte A4 = 18;
> const byte A5 = 19;
> Now if someone writes:
> int value = analogRead(A0);
> analogWrite(P3, 255);
> it has a better chance of working on multiple boards, where the chips special functions are on different pins.
>
> Initally, you need only make the changes to the silkscreen. The software changes can come later.
>
> giuliano
>
> On May 17, 2010, at 8:52 PM, Adrian Freed wrote:
>
>> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>>> I think any numbering scheme that needs a key to explain it is probably more complex than we should do. I'd rather go with phasing out the A0 in favor of numbers. I like the mBed diagram
>> Numbers are meaningless symbols - add a few letters in and they have mnemonic
>> value. I wont bore you with an argument because OSC already makes this case.
>> The recommended practice in OSC is to use addresses that correspond to exactly
>> what is on the PCB silkscreen. There is then no documentation to look up or synchronize and no need to explain to beginners any arbitrary numerical sequences.
>> This also means you never have to know that analog pins start at 14 on some
>> boards and 54 on others and many applications will be portable across boards.
>>
>>
>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. > In any case, the existing system of using numbers for these pins in the software seems to work (e.g. analogWrite(9)), I don't really see the need for aliases for those, at least with the intention of helping beginners and clarifying the examples. It might make sense for cross-board compatibility reasons, but again, that feels like a larger issue.
>

A few months ago, I worked on a hardware abstraction layer for Firmata
which makes it compatible with nearly any board, including Arduino
Mega. Currently this code is in a branch on Firmata's svn, but
hopefully will merge soon.

Firmata needs more info about the hardware than is available from the
core's header files. Any program that wants to do generic I/O would as
well.

The simplest requirement is knowing how many pins exist. This can't be
fully detected by only the CPU type. For example, a Duemilanove has 20
pins, but a Mini with the same CPU has 22 pins, because there are 2
extra analog pins. Hopefully someday Compiler.java can pass a
-Dboardname to gcc, which is definable from boards.txt, and headers in
the core can define a symbol that tells the proper number of pins for
the actual board selected in the Tools->Boards menu? Another simple
requirement was knowing which pin the LED is connected to, if there is
any LED on the board at all.

Also important is a way to know if any specific pin supports a
particular feature. In Firmata, I created a header called Boards.h
which attempts to define this for many known boards, admittedly clumsily
based on the CPU type, because that's the only information available
today. For example, the macro IS_PIN_ANALOG() returns true if a pin
works with analogRead(). IS_PIN_PWM() returns true if analogWrite()
will work, and IS_PIN_DIGITAL() is true if pinMode(), digitalWrite() and
digitalRead() work. The IS_PIN_DIGITAL() check might see silly, but
those extra 2 analog pins on the Mini (or any board with the TQFP chip)
do not implement digital I/O, only analog input. Really, this is pretty
simple stuff, other than the hazard of making the assumptions based only
on the CPU type symbol automatically defined by the compiler.

I realize hardware abstraction can feel like a hugely insurmountable
task to even just think about. Indeed fully abstracting every possible
detail would be. But a lot of what's needed by real applications like
Firmata are pretty simple symbols and macros. Maybe it's time to
incorporate even some simple symbols and macros in the core's headers to
express what I/O capabilities the user's board actually implements?


-Paul


ps: I believe the patch to Compiler.java to support this would only
require a this 1 line, added in getCommandCompilerS,
getCommandCompilerC, and getCommandCompilerCPP:

"-D" + boardPreferences.get("build.header_name"),

Each entry in boards.txt would need to define this, and then the core's
headers could do #ifdef checks based on the known names, and define true
board-specific symbols like the total number of pins.


_______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe. What you propose makes things harder for beginners. Especially folks
who have never written a line of code.

Over and over in my classes folks got hung up by a set of interrelated
confusing issues. Consider the following code:
digitalRead(3);
digitalWrite(3, HIGH);
analogRead(3);
analogWrite(3, 127);
attachInterrupt(1, onInt1);
The questions that come up:
- Why are the pins for digitalRead/analogRead different?
- Okay, so you told me that their are separate banks of pins for
analog and digital. So why don't analogRead and analogWrite use the
same pin? Why does analogWrite use a digital pin?
- Why does attachInterrupt(1) connect to digital pin 3?

At the very least I think it is important to:
- Use a single set of number for digital and analog pins. For the
duemilanove, 0-19.
- Label the analog pins with both the digital pin number and the
analog notation. For example, "14 A0".
- Use the new pin number for analogRead().
- Provide aliases in the software for the analog pins.
All those questions then go away. The above code could then be:
digitalRead(3);
digitalWrite(3, HIGH);
analogRead(A3); // or analogRead(16);
analogWrite(3, 127); // or analogWrite(P0, 127);
attachInterrupt(I1, onInt1);
They would SEE the relationship. It's right on the board. A3 is the
same as digital 16. I1 is the same as digital 3. P0 is the same as
digital 3.

The software labels with corresponding aliases are what drive the need
to provide a number for the PWM pins, or any feature that are provided
by multiple pins. For example, on the mega, I'd label the various
serial pins Rx0, Rx1, Rx2, Rx3. As the duemilanove provides a single
usart, having a number could be confusing. It could either be labeled
Rx or Rx0, I don't have a strong preference either way. If it is
labeled Rx, then the software would have aliases for both Rx and Rx0
that would have the same value.

These change require changes to the existing semantics. analogRead(0)
would need to be changed to analogRead(14). I've earlier suggested a
solution to this problem by using the C++ "using" statement:
- When the preprocessor sees no using statement in the sketch, it adds
"using ArduinoApiV1".
- The user may choose to add a using statement to their code, for
exampe "using ArduinoApiV2".
- Place the current api within the namespace ArduinoApiV1 and the new
one within the namespace ArduinoApiV2.
I tried a simplified version of this, placing only analogRead within
the namespaces, and it worked quite nicely.

giuliano

On May 18, 2010, at 5:51 AM, David A. Mellis wrote:

> Hi,
>
> I think we're sticking with numbers as the primary labels for the
> digital pins and standardizing on A0, A1, etc. as the primary labels
> for the analog input pins. To me, then, it makes sense to use these
> labels in the software, too.
>
> I can certainly see the argument for including more information on
> the boards. Labeling the interrupts, the SPI, and the I2C pins in
> particular could be useful. We already label the PWM pins, although
> I'm not sure they need individual numbers. In any case, the
> existing system of using numbers for these pins in the software
> seems to work (e.g. analogWrite(9)), I don't really see the need for
> aliases for those, at least with the intention of helping beginners
> and clarifying the examples. It might make sense for cross-board
> compatibility reasons, but again, that feels like a larger issue.
>
> David
>
> On May 18, 2010, at 2:50 AM, giuliano carlini wrote:
>
>> A huge DITTO.
>>
>> I know space is tight on toards but they should include as much
>> info as possible about how you can use each pin. That means its
>> digital I/O pin #, and at least its primary alternate function. All
>> alternate functions would be nice. If necessary, use Adrians prefix
>> idea. So, for example, for the Duemilanove:
>> 0 Rx
>> 1 Tx
>> 2 I0
>> 3 P0 I1
>> 4
>> 5 P1
>> 6 P2
>> 7
>> 8
>> 9 P3
>> 10 P4 SS
>> 11 P5 SI
>> 12 SO
>> 13 CK
>> 14 A0
>> 15 A1
>> 16 A2
>> 17 A3
>> 18 A4 SD
>> 19 A5 SC
>> All functions should take the digital pin numbers. But there should
>> be aliases for each alternate function:
>> const byte Rx = 0;
>> const byte Tx = 1;
>> const byte I0 = 2;
>> const byte I1 = 3;
>> const byte P0 = 3;
>> const byte P1 = 5;
>> const byte P2 = 6;
>> const byte P3 = 9;
>> const byte P4 = 10;
>> const byte P5 = 11;
>> const byte SS = 10;
>> const byte SI = 11;
>> const byte CK = 12;
>> const byte A0 = 14;
>> const byte A1 = 15;
>> const byte A2 = 16;
>> const byte A3 = 17;
>> const byte A4 = 18;
>> const byte A5 = 19;
>> Now if someone writes:
>> int value = analogRead(A0);
>> analogWrite(P3, 255);
>> it has a better chance of working on multiple boards, where the
>> chips special functions are on different pins.
>>
>> Initally, you need only make the changes to the silkscreen. The
>> software changes can come later.
>>
>> giuliano
>>
>> On May 17, 2010, at 8:52 PM, Adrian Freed wrote:
>>
>>> At 1:20 PM -0400 5/17/10, Tom Igoe wrote:
>>>> I think any numbering scheme that needs a key to explain it is
>>>> probably more complex than we should do. I'd rather go with
>>>> phasing out the A0 in favor of numbers. I like the mBed diagram
>>> Numbers are meaningless symbols - add a few letters in and they
>>> have mnemonic
>>> value. I wont bore you with an argument because OSC already makes
>>> this case.
>>> The recommended practice in OSC is to use addresses that
>>> correspond to exactly
>>> what is on the PCB silkscreen. There is then no documentation to
>>> look up or synchronize and no need to explain to beginners any
>>> arbitrary numerical sequences.
>>> This also means you never have to know that analog pins start at
>>> 14 on some
>>> boards and 54 on others and many applications will be portable
>>> across boards.
>>>
>>>
>>> _______________________________________________
___________________________________________________

Posted on the Developers mailing list. Go to http://arduino.cc/mailman/listinfo/developers_arduino.cc to subscribe.





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: