need help with project please!

project criteria: re-create your blinking code using a "for" statement to shorten your code. use it to declare all digital pins being used to "output" in you void setup and to repeat your blinking code in your void loop

ex for (int x +1; x <+ 5; x++) { DO SOMETHING)

i am supposed to be able to do this in 9 lines of code

void setup() {

this is my code so far.

void setup() {

// put your setup code here, to run once:
for (int x = 1; x <=13; x++)
pinMode (1, OUTPUT);
pinMode (2, OUTPUT);
pinMode (3, OUTPUT);
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);

}

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

When do we have to hand in our homework?

for (int x = 1; x <=13; x++) Why not use "x"?

i need it done by tommorow :o

Got coffee?
(sp. "tomorrow")

Don't use pin 1 - it has extremely useful other properties.

Also, you need to have a word with your teachers - setup and loop are functions , not "voids"

Top of page, Resources / Reference check out 'for'. It tells you how to use for loops. Two for loops, one for setting pinMode() and another for doing the digitalWrite()s and you're there.

Steve