Small oversight in AnalogInput example?

Since the program has been around since 2011, maybe I am missing something. But shouldn't there be a resistor in below explanation?

  • LED
    anode (long leg) attached to digital output 13
    cathode (short leg) attached to ground

I'm on 1.8.8 so maybe it has been fixed already.

++Karma; // Well spotted! Yes, there should be a resistor.

As noted on many Arduino boards there is already an LED on digital output 13, so another one is not needed.

@pert
For clarity this is the example in IDE Examples / 03Analoge / Analogue input

OK, I have submitted a pull request to specify this:

Please review my proposed changes and either request changes or submit an approval.

I did a comprehensive review of all the examples and found the same occurred on 10 others, which my proposal fixes in addition to the "AnalogInput" example mentioned here.

As noted on many Arduino boards there is already an LED on digital output 13,

Well not many, the resistor on pin 13 disappeared in about 2006 but the tutorials still hang around.
It was removed because it interfered with using pin 13 on SPI circuits.

That looks good to me pert.

Grumpy_Mike:
Well not many, the resistor on pin 13 disappeared in about 2006 but the tutorials still hang around.
It was removed because it interfered with using pin 13 on SPI circuits.

As you might remember I first came here 2 or 3 years ago so am not really familiar with the history of Arduino. I have a genuine Uno and a clone Mega; both of recent vintage and with LEDs on pin 13. My more recent purchase of a Nano Every also has the LED on pin 13. Can you clarify what you mean?

Uno and Mega have D13 going to an op amp/comparator (1/2 of LM358) which then drives the LED, so the load on D13 is only 1-2uA, vs 5-10-15 mA to drive the LED.

Nano still drives the LED thru a current limit resistor.

Ah! Thanks! :slight_smile:

This is not the whole story.

Long ago, there was a major foul-up in the design of the Arduino NG, the predecessor to the Diecimila which preceded the Duemilanove from which the UNO was derived! :grinning:

As you will note, pin 13 was connected to a resistor and LED, but instead of also connecting the pin to the header, the header instead connected to the LED and that via a second 470 Ohm resistor, not only rendering pin 13 essentially functionally inaccessible to the outside world but even then, while this meant that an external LED could safely be connected without a resistor to this header pin, its brightness was minimised

Quite a peculiar blunder - I do wonder how it occurred (in two successive issues!), back in the mists of Arduino time. :roll_eyes:

Thank you Paul.

Ever looked back at something you designed a long time ago and wondered "why the ... did I do that???"

PerryBebbington:
Ever looked back at something you designed a long time ago and wondered "why the ... did I do that???"

Many years ago when I was designing my first product with a business partner, we would often say “why is this bit like it is”, if the answer was “historic” it meant that at one stage it was important to do that but the reason for doing it exactly that way has gone away and now it is as good as any other way.

Hi all. I'm still waiting on a review. The feedback from any interested party is welcome.

Let's move this thing forward so it ends up being more than just blowing hot air on the forum.

I am not sure what it is you expect to happen?

Hi @Paul__B. Thanks for your interest. If you're not familiar with the GitHub pull request review process, you can learn about it here:

Arduino's policy is that every pull request must receive a formal approval via the GitHub pull request review system before it can be merged. This makes sure there have been at least two sets of eyes on every change: the person who submitted the proposal and the person who approved it. So once I get an approval from someone I will be able to merge the pull request and the world will be an ever so slightly better place.

And... merged! Thank you.