i got problems

Please help me! Yesterday i started arduino and today i started programing it i gte a cople of error messages with this code and does not understand every error message. (I wrote it down from the book and fixed acouple of problems.) Here is the code:

void setup() {

{const byte;{byte ledPins[4] = (6, 9, 10, 11);}
}
// Use GPIO pin 6, 9, 10 and 11 as output
for (int i = 0; i <= 3; i++) {
pinMode(ledPins*, OUTPUT)*

  • }*
    }
    void loop() {
  • // Fade up led*
  • for (int i = 0; i <= 3; i++) {*
  • for (int j = 0; j <= 255; j++) {*
    _ analogWrite(ledPins*, j);_
    _
    delay(1);_
    _
    }_
    _
    }_
    _
    // Fade down led*_
    * for (int i = 0; i <= 3; i++) {*
    * for (int j = 255; j >= 0; j–) {*
    _ analogWrite(byte ledPins*, j);
    delay(1);
    }
    }
    }*_
const byte ledPins[] = {6, 9, 10, 11};
void setup(){
  // Use GPIO pin 6, 9, 10 and 11 as output
  for (int i = 0; i <= 3; i++) {
    pinMode(ledPins[i], OUTPUT);
  }
}

void loop() {
  // Fade up led
  for (int i = 0; i <= 3; i++) {
    for (int j = 0; j <= 255; j++) {
      analogWrite(ledPins[i], j);
      delay(1);
    }
  }

  // Fade down led
  for (int i = 0; i <= 3; i++) {
    for (int j = 255; j >= 0; j--) {
      analogWrite(ledPins[i], j);
      delay(1);
    }
  }
}

I just clear the errors. I don’t know what to do this code for ?.

Please explain clearly. Again I just clear the syntax error only not in logical error

Thank you(Helping Minds)

Look at your code above. Does it look like the code in the IDE ?
No. The code in the IDE does not have any italics in it. The italics are there because you did not use code tags round your code. It would have helped if you had read the posts by Nick Gammon at the top of this forum and followed the advice given in them before posting the question.

As to your errors :

{const byte;{byte ledPins[4] = (6, 9, 10, 11);}Which variable is a const byte ? Why the braces round this line but not around the array values ? Why are you declaring an array that is local to the setup() function which is referenced in other scopes ?

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

Thank you all so much, i am a rookie and was probably to exited with starting and needing help. This is my first project so, i am trying to make a led light who fades up and down with light. Thank you again! thanks for taking time to help me.

Did you get it working ?