Neither of my boards seem to be working but I cannot identify why

I have a pair of boards that I dug out of storage and was going to start coding for a series of lights, but I cant get a singular LED to turn on, same code, both boards. I have a standard blink uploaded to both.


on the mega2560 the blink works fine, I can see it through the L light, but as soon as I plug in an LED, neither the LED nor the L light blink.


the Uno just has the L light blink rapidly 3 - 5 times, not following the code pattern, and then just dying until I unplug it and plug it back in. I think the Uno might just be broken, but what is up with the mega?

Welcome to the forum

Please do not post pictures of code

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

Please post your full sketch, using code tags when you do

Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

It is also helpful to post full error messages in code tags as it makes it easier to scroll through them and copy them for examination

There should be a current limiting resistor in series with the LED

sorry that wasn't in the picture but I did have one there originally

Let's hope that you have not damaged something .....

That's what I'm hoping but the boards are relatively unused so I wouldn't have thought they would be

here's the code in forum form:


void setup() {
  // put your setup code here, to run once:
  pinMode(13, OUTPUT);
}


void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(13, HIGH);
  delay(200);
  digitalWrite(13, LOW);
  delay(200);
}

Nice, killed the LED and the IO pin by not using a current limiting resistor, double kill.

Thank you but the problem is not the code

Try using a different pin to drive the external LED but you must use a current limiting resistor

Different pin works! thank you. I don't know why 13 doesn't work, but i guess I'll just work without it.

oops.....