Problem with Blink Program

I want to make two leds blink in the same program, this is the code Im using

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(13, OUTPUT);
  pinMode(12, 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(1000);                       // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second

  digitalWrite(12, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(12, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);
}

the computer send me an error when I upload it, What should I change?

caras54:
What should I change?

Change your post to include the error message.

Hi,
Does it compile, it does for me IDE 1.6.7.
Check you have the controller COM correct.

Tom.. :slight_smile:

It compiles and runs fine omm. What exactly does the red, error text say? Just copy and paste it in a quote. I suspect you are not correctly connected to your Arduino, so explain how you have it connected to your computer as well please.

The demo Several Things at a Time is an extended example of BWoD and flashes 3 LEDs, It may help with understanding the technique.

...R

Robin... whoa there!
He's still having trouble connecting and uploading!
millis() comes next!

Nothing wrong with the code. Error is in your IDE settings, board selection, port selection, etc. Make sure nothing is plugged into pins 0 and 1

lastchancename:
Robin… whoa there!
He’s still having trouble connecting and uploading!
millis() comes next!

Sorry. I paid too much attention to the title :slight_smile:

…R

I think the OP has left the building.