Super newbie, "expected initializer" error

I cut and pasted code to simply blink an LED.

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:the setup function runs once when you press reset or power the board
void setup() 
  // initialize digital pin 13 as an output.
  pinMode(13, 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

The error message reads, "expected initiallizer before 'pinmode'"

I'm grateful for any help you can give me, but warn you that I might be in over my head!

When you paste a full example code, make sure that you paste it in an empty sketch. You now have two setup() functions and two loop() functions.

Your actual problem is caused by the fact that you do not have a closing } at the end of the (second) loop() function.

Unfortunately, I'm more newbie than that. I tried an empty sketch and got 'expected unqualified-id before '{' token' as an error message. I know I'm missing something truly simple, but i've spent hours looking. And 2 loops? sigh I don't even see THAT.

You just have a little extra at the top, and were misssing some { and } See the /* multiline comments */ // and the other comments

/* delete from here ...
void setup() {
  // put your setup code here, to run once:


}


void loop() {
  // put your main code here, to run repeatedly:the setup function runs once when you press reset or power the board


 ... to here */ 


  void setup() { // missing this brace
    // initialize digital pin 13 as an output.
    pinMode(13, OUTPUT);
  }


  // the loop function runs over and over again forever
  void loop() { // missing this  brace
    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
  } // and this one

LibraryJean: And 2 loops? sigh I don't even see THAT.

Here, I'll pull it out of code tags and highlight them for you.

Basically, you forgot to delete what was on the page before you pasted in your code.

void setup() { // put your setup code here, to run once:

}

void loop() { // put your main code here, to run repeatedly:the setup function runs once when you press reset or power the board void setup() // initialize digital pin 13 as an output. pinMode(13, 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