Arduino Mega 2560 onboard LED L does not blink

I have a guanine Arduino Mega2560 the onboard LED will not blink or will not blink an LED that is connected to D13 pin with the Blink sketch loaded. If I press the reset button it blinks once and then remains on. if I have the led connected to pin 13 and ground with a led and resistor connected , it follows the onboard led and only blinks once. is something damaged on the board causing it? Or is there a way to get it back to blinking again? I have tried to find anything regarding this on the forum and searched the web but find nothing that tells me what to do. This mega is very new as I have recently purchased it, maybe some part failed. Any ideas?

I guess that code can be responsible for this. Do You mind sharing the code with us?

This is the schematic of the Arduino mega referring to port 13.
Note that there is a CI LMV358IDGKR between port 13 and the LED.
Test using an LED and an external resistor on another port, for example port 10.
If it works, turn on the LED and the resistor on port 13 and try again.

RV mineirinMEGA



Turns an LED on for one second, then off for one second, repeatedly.

Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:

modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman

This example code is in the public domain.

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.

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

Well I think I am more confused now than before. I tried connecting the kead from D13 to D10 and ran the sketch and the LED did not even light up. no blink or anything, so I wrote a different sketch as follows:

void setup() {
pinMode(10, OUTPUT);
void loop() {
digitalWrite(10, HIGH);
digitalWrite(10, LOW);

When I ran this sketch, the LED does not even light up, no blink nothing. i am using a red 5mm LED, a 220 ohm resistor in series with the LED . The long lead of the LED is connected to pin 10 and the other lead is connected to ground. Another thing happens when the led is connected to D13 it stays ib like the onboard LED but when I oress the reset button it blinks three tunes then stays on.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.