Problem with D2 Pin on Arduino Micro

Hello everyone.
I have received my Arduino Micro today and wanted to play around with 3 LED I have found lying around.

So I connected the 3 LED to Pin 2,3 and 4 with the following code.

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

void loop() {
  // put your main code here, to run repeatedly: 
   digitalWrite(2, HIGH); 
   digitalWrite(4, HIGH);  
   digitalWrite(3, HIGH);  
  

   
}

LED 2 and 4 work but not LED 3. So I guess it’s another kind of Pin. Then I found this Document
http://pighixxx.com/micropdf.pdf

The only problem I got now, is that I have no Idea how to read all the abbreviations.
So which are digital, analog, PWM Serial etc?

Thank you very much

I have received my Arduino Micro today

Which one?

So I connected the 3 LED to Pin 2,3 and 4

Hope you used resistors as well. Otherwise you could have damage the pins.

So which are digital

All of them.

analog,

The ones marked in green

PWM

The ones marked with a squiggle.

Serial

The ones marked pail blue.

Note that any one pin may have a number of uses depending on the software.

Hello,
its an Arduino Micro R3.
So if all of them are digital, why does my code not work?

Thanks

So if all of them are digital, why does my code not work?

I suspect that you have misidentified what the software regards as Pin 3.
Did you select Arduino Micro as the board from the tools menu?

I used the pins marked as D2, D3 and D4. D2 and D4 work fine so I guess these are the right pins?

Also, physically where are you measuring the HIGH and with what?

LarryD:
Also, physically where are you measuring the HIGH and with what?

He has LEDs.

Have you swapped the LEDs around on the pins so you know the one that's not lighting up, actually works?

If they use a voltmeter to measure the output levels it will tell them if there is a HIGH or LOW.
If it is a HIGH they will know the problem is not with their Arduino or the program.

They might want to make a simple LED logic probe out of an old plastic pen using a LED and a resistor( if they don’t have a voltmeter).

Here is some code to make the pins flash:-

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

void loop() {
  // put your main code here, to run repeatedly: 
   digitalWrite(2, HIGH); 
   digitalWrite(4, HIGH);  
   digitalWrite(3, HIGH);  
  delay(500);
   digitalWrite(2, LOW); 
   digitalWrite(4, LOW);  
   digitalWrite(3, LOW); 
  delay(500);   
}

Here is a picture of how it is wired up.

If you do not get the LED blinking when it is wired up like this then one of the following is true:-

  1. The board has a damaged pin.
  2. The LED is broken or wired up the wrong way round.
  3. The wire or pin connection are not making contact

Guten Tag,
ich habe das Ganze einmal um einen Platz in meinem Steckboard versetzt und gemerkt, dass dieses defekt war. Respektive die Kontakte nicht mehr gut sind.

Besten Dank für die Hilfe und das nette Aufnehmen in die Welt des Arduinos und dieses Forum