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);
}