led brightness

Hello,

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

This example code is in the public domain. */

// Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; int led1 = 12;

// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }

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

this is the normal blink sketch with one led more. there is in normal blue led connectet from pin 12 to gnd.

When i first put led13 high in the code the blue led is not so bright like when i fist put led12 high. What is the problem? Why will the LED on pin 12 not have the same brightness?

There's something missing here:

  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);

Hint: you have two pins..... 8)

Once you fix that, the LED brightness will also vary with the current limit resistor used, and the mcd rating of the LED.

:D:D i need a break ;)

Sometimes it does come down to that 8)