It is not clear to me whether Pin 13, corresponding to the LED, should be driven by an external voltage or not.

From the documentation,

LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

However, in the "Blink" example code I am running, the Pin 13 appears to be driven by the ATmega328:

void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(2000);              // wait for a second

If I now attach a voltage source to Pin 13, will there be contention issues?

1 Answer 1


Like any other I/O pin, there should be no problem driving this pin (and thus the builtin LED) from an external source, as long as you make sure it is in INPUT mode. If the pin is set to OUTPUT you will likely damage the Arduino.

Warning: If you have the Blink example already loaded in the Arduino, the pin is in output mode. Be sure to upload another program, that does not set pin 13 to output, before connecting anything that could drive pin 13.

  • 2
    It would be good defensive - and documentary - practice to explicitly set it to INPUT during setup() rather than depending on the default.
    – JRobert
    Commented May 30, 2016 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.