How to control 12 led with Uno

This is my first instructable and I want to thank Oadil for his instructable Trafik light, 9 led using Arduino UNO I bought a simple UNO micro controller and I was looking for an easy project to be able to understand the inputs and the outputs. Check out his instruct able to see the first steps and how to connect the led with the different outputs. I could just copy his text but I really wanna give him some credit. I spent several days before I found help.

Step 1: Trafik lights

int led2 = 2;

int led3 = 3; int del=1000; int led4 = 4; int led5 = 5; int led6 = 6; int led7 = 7; int led8 = 8; int led9 = 9; int led10 = 10;

// the set up routine runns once when you press reset:

void setup () { // initialize the digital pin as oupput.

pinMode(led2, OUTPUT); pinMode(led3, OUTPUT); pinMode(led4, OUTPUT); pinMode(led5, OUTPUT); pinMode(led6, OUTPUT); pinMode(led7, OUTPUT); pinMode(led8, OUTPUT); pinMode(led9, OUTPUT); pinMode(led10, OUTPUT); } //the loop routine runs over and over again forever:

void loop(){

digitalWrite(led2, HIGH); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, LOW); digitalWrite(led10, LOW);

//All red

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, LOW); digitalWrite(led10, LOW);

delay(del*2);

// GREEN1

digitalWrite(led2, LOW); digitalWrite(led3, HIGH); digitalWrite(led4, LOW); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, LOW); digitalWrite(led10, LOW);

delay(del);

//YELLOW1

digitalWrite(led2, HIGH); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, LOW); digitalWrite(led10, LOW);

delay(del/2);

//ALL RED

digitalWrite(led2, HIGH); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, HIGH); digitalWrite(led8, HIGH); digitalWrite(led9, LOW); digitalWrite(led10, LOW);

delay(del*2);

//GREEN 2

digitalWrite(led2, HIGH); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, HIGH); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, LOW); digitalWrite(led10, LOW); delay(del);

//YELLOW2

digitalWrite(led2, HIGH); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, LOW); digitalWrite(led10, LOW);

delay(del/2);

//ALL RED

digitalWrite(led2, HIGH); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, HIGH);

delay(2*del);

//GREEEN2

digitalWrite(led2, HIGH); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, HIGH); digitalWrite(led10, LOW);

delay(del);

//YELLOW3

}

Step 2: Christmas lights

Now that I understood a lille bit more I wanted to play and explore some possibilities.

Observe that the fist two columns are just the same. but I added three more outputs and tried to make it work like the christmas lights.

Copy and paste the code below.

int led2 = 2;
int led3 = 3; int del=1000; int led4 = 4; int led5 = 5; int led6 = 6; int led7 = 7; int led8 = 8; int led9 = 9; int led10 = 10; int led11= 11; int led12= 12; int led13= 13;

// the set up routine runns once when you press reset:

void setup () { // initialize the digital pin as oupput.

pinMode(led2, OUTPUT); pinMode(led3, OUTPUT); pinMode(led4, OUTPUT); pinMode(led5, OUTPUT); pinMode(led6, OUTPUT); pinMode(led7, OUTPUT); pinMode(led8, OUTPUT); pinMode(led9, OUTPUT); pinMode(led10, OUTPUT); pinMode(led11, OUTPUT); pinMode(led12, OUTPUT); pinMode(led13, OUTPUT); }

// ALL ON

void loop(){ digitalWrite(led2, HIGH); delay(del); digitalWrite(led3, HIGH); delay(del/2); digitalWrite(led4, HIGH); delay(del/3); digitalWrite(led5, HIGH); delay(del/4); digitalWrite(led6, HIGH); delay(del/5); digitalWrite(led7, HIGH); delay(del/6); digitalWrite(led8, HIGH); delay(del/7); digitalWrite(led9, HIGH); delay(del/8); digitalWrite(led10, HIGH); delay(del/9); digitalWrite(led11, HIGH); delay(del/10); digitalWrite(led12, HIGH); delay(del/11); digitalWrite(led13, HIGH); delay(del);

// ALL OFF

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); delay(del/3); digitalWrite(led3, HIGH); delay(del/3); digitalWrite(led4, HIGH); delay(del/3); digitalWrite(led5, HIGH); delay(del/3); digitalWrite(led6, HIGH); delay(del/3); digitalWrite(led7, HIGH); delay(del/3); digitalWrite(led8, HIGH); delay(del/3); digitalWrite(led9, HIGH); delay(del/3); digitalWrite(led10, HIGH); delay(del/3); digitalWrite(led11, HIGH); delay(del/3); digitalWrite(led12, HIGH); delay(del/3); digitalWrite(led13, HIGH); delay(del);

// ALL OFF

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH);

delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH);

delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); delay(del/5); digitalWrite(led3, HIGH); delay(del/5); digitalWrite(led4, HIGH); delay(del/5); digitalWrite(led5, HIGH); delay(del/5); digitalWrite(led6, HIGH); delay(del/5); digitalWrite(led7, HIGH); delay(del/5); digitalWrite(led8, HIGH); delay(del/5); digitalWrite(led9, HIGH); delay(del/5); digitalWrite(led10, HIGH); delay(del/5); digitalWrite(led11, HIGH); delay(del/5); digitalWrite(led12, HIGH); delay(del/5); digitalWrite(led13, HIGH); delay(del);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); delay(del/5); digitalWrite(led3, HIGH); delay(del/5); digitalWrite(led4, HIGH); delay(del/5); digitalWrite(led5, HIGH); delay(del/5); digitalWrite(led6, HIGH); delay(del/5); digitalWrite(led7, HIGH); delay(del/5); digitalWrite(led8, HIGH); delay(del/5); digitalWrite(led9, HIGH); delay(del/5); digitalWrite(led10, HIGH); delay(del/5); digitalWrite(led11, HIGH); delay(del/5); digitalWrite(led12, HIGH); delay(del/5); digitalWrite(led13, HIGH); delay(del);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4); digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH);

delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4); digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH);

delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); delay(del/5); digitalWrite(led3, HIGH); delay(del/5); digitalWrite(led4, HIGH); delay(del/5); digitalWrite(led5, HIGH); delay(del/5); digitalWrite(led6, HIGH); delay(del/5); digitalWrite(led7, HIGH); delay(del/5); digitalWrite(led8, HIGH); delay(del/5); digitalWrite(led9, HIGH); delay(del/5); digitalWrite(led10, HIGH); delay(del/5); digitalWrite(led11, HIGH); delay(del/5); digitalWrite(led12, HIGH); delay(del/5); digitalWrite(led13, HIGH); delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4); digitalWrite(led13, HIGH); delay(del/5); digitalWrite(led12, HIGH); delay(del/5); digitalWrite(led11, HIGH); delay(del/5); digitalWrite(led10, HIGH); delay(del/5); digitalWrite(led9, HIGH); delay(del/5); digitalWrite(led8, HIGH); delay(del/5); digitalWrite(led7, HIGH); delay(del/5); digitalWrite(led6, HIGH); delay(del/5); digitalWrite(led5, HIGH); delay(del/5); digitalWrite(led4, HIGH); delay(del/5); digitalWrite(led3, HIGH); delay(del/5); digitalWrite(led2, HIGH); delay(del);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH);

delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, HIGH);

delay(del/4);

digitalWrite(led3, LOW); digitalWrite(led4, HIGH);

delay(del/4);

digitalWrite(led4, LOW); digitalWrite(led5, HIGH);

delay(del/4);

digitalWrite(led5, LOW); digitalWrite(led6, HIGH);

delay(del/4);

digitalWrite(led6, LOW); digitalWrite(led7, HIGH);

delay(del/4);

digitalWrite(led7, LOW); digitalWrite(led8, HIGH);

delay(del/4);

digitalWrite(led8, LOW); digitalWrite(led9, HIGH);

delay(del/4);

digitalWrite(led9, LOW); digitalWrite(led10, HIGH);

delay(del/4);

digitalWrite(led10, LOW); digitalWrite(led11, HIGH);

delay(del/4);

digitalWrite(led11, LOW); digitalWrite(led12, HIGH);

delay(del/4);

digitalWrite(led12, LOW); digitalWrite(led13, HIGH); delay(del/4);

digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); delay(del/5); digitalWrite(led3, HIGH); delay(del/5); digitalWrite(led4, HIGH); delay(del/5); digitalWrite(led5, HIGH); delay(del/5); digitalWrite(led6, HIGH); delay(del/5); digitalWrite(led7, HIGH); delay(del/5); digitalWrite(led8, HIGH); delay(del/5); digitalWrite(led9, HIGH); delay(del/5); digitalWrite(led10, HIGH); delay(del/5); digitalWrite(led11, HIGH); delay(del/5); digitalWrite(led12, HIGH); delay(del/5); digitalWrite(led13, HIGH); delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led13, HIGH); delay(del/5); digitalWrite(led12, HIGH); delay(del/5); digitalWrite(led11, HIGH); delay(del/5); digitalWrite(led10, HIGH); delay(del/5); digitalWrite(led9, HIGH); delay(del/5); digitalWrite(led8, HIGH); delay(del/5); digitalWrite(led7, HIGH); delay(del/5); digitalWrite(led6, HIGH); delay(del/5); digitalWrite(led5, HIGH); delay(del/5); digitalWrite(led4, HIGH); delay(del/5); digitalWrite(led3, HIGH); delay(del/5); digitalWrite(led2, HIGH); delay(del);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH);

delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH);

delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH);

delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, HIGH);

delay(del/4);

digitalWrite(led3, LOW); digitalWrite(led4, HIGH);

delay(del/4);

digitalWrite(led4, LOW); digitalWrite(led5, HIGH);

delay(del/4);

digitalWrite(led5, LOW); digitalWrite(led6, HIGH);

delay(del/4);

digitalWrite(led6, LOW); digitalWrite(led7, HIGH);

delay(del/4);

digitalWrite(led7, LOW); digitalWrite(led8, HIGH);

delay(del/4);

digitalWrite(led8, LOW); digitalWrite(led9, HIGH);

delay(del/4);

digitalWrite(led9, LOW); digitalWrite(led10, HIGH);

delay(del/4);

digitalWrite(led10, LOW); digitalWrite(led11, HIGH);

delay(del/4);

digitalWrite(led11, LOW); digitalWrite(led12, HIGH);

delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, HIGH); delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4);

digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); delay(del/4); digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); delay(del/4);

digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH); delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW); delay(del/4); }

Step 3: Forward movement

I was thinking in a worm when I wrote this.

int led2 = 2;

int led3 = 3; int del=1000; int led4 = 4; int led5 = 5; int led6 = 6; int led7 = 7; int led8 = 8; int led9 = 9; int led10 = 10; int led11= 11; int led12= 12; int led13= 13;

// the set up routine runns once when you press reset:

void setup () { // initialize the digital pin as oupput.

pinMode(led2, OUTPUT); pinMode(led3, OUTPUT); pinMode(led4, OUTPUT); pinMode(led5, OUTPUT); pinMode(led6, OUTPUT); pinMode(led7, OUTPUT); pinMode(led8, OUTPUT); pinMode(led9, OUTPUT); pinMode(led10, OUTPUT); pinMode(led11, OUTPUT); pinMode(led12, OUTPUT); pinMode(led13, OUTPUT); }

void loop(){ digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); delay(del/4); digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); delay(del/4);

digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, HIGH); digitalWrite(led7, HIGH); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, HIGH); digitalWrite(led11, HIGH); delay(del/4);

digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, HIGH); digitalWrite(led5, HIGH); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, HIGH); digitalWrite(led9, HIGH); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, HIGH); digitalWrite(led13, HIGH); delay(del/4); digitalWrite(led2, LOW); digitalWrite(led3, LOW); digitalWrite(led4, LOW); digitalWrite(led5, LOW); digitalWrite(led6, LOW); digitalWrite(led7, LOW); digitalWrite(led8, LOW); digitalWrite(led9, LOW); digitalWrite(led10, LOW); digitalWrite(led11, LOW); digitalWrite(led12, LOW); digitalWrite(led13, LOW);

}

 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel