Está en la página 1de 5

Proyecto 2

Secuencias con Led

Materiales:

Arduino UNO
11 Leds
12 cables Macho Macho
1 Protoboard
Conectamos todos los leds por el Ctodo a la tierra (GND) del Arduino utilizando el bus negativo o
positivo del Protoboard.

Luego conectamos los nodos a diferentes pistas del Protoboard, para luego ser conectadas
utilizando los cables a las entradas digitales (2-12) del Arduino.

Pueden ver el Video del Resultado https://youtu.be/cN9D0Kj7vgw


Cdigo del Proyecto.
void setup() {

for(int i=2;i<=12;i++){

pinMode(i, OUTPUT);

void loop() {

for(int i=2;i<=12;i++){

digitalWrite(i, HIGH);

delay(200);

digitalWrite(i, LOW);

for(int i=2;i<=12;i++){

digitalWrite(i, HIGH);

delay(200);

for(int i=2;i<=12;i++){

digitalWrite(i, LOW);

delay(200);

for(int i=2;i<=12;i++){

digitalWrite(14-i, HIGH);

delay(200);

digitalWrite(14-i, LOW);

digitalWrite(7, HIGH);

delay(200);

digitalWrite(6, HIGH);

digitalWrite(8, HIGH);

delay(200);

digitalWrite(5, HIGH);
digitalWrite(9, HIGH);

delay(200);

digitalWrite(4, HIGH);

digitalWrite(10, HIGH);

delay(200);

digitalWrite(3, HIGH);

digitalWrite(11, HIGH);

delay(200);

digitalWrite(2, HIGH);

digitalWrite(12, HIGH);

delay(200);

digitalWrite(7, LOW);

delay(200);

digitalWrite(6, LOW);

digitalWrite(8, LOW);

delay(200);

digitalWrite(5, LOW);

digitalWrite(9, LOW);

delay(200);

digitalWrite(4, LOW);

digitalWrite(10, LOW);

delay(200);

digitalWrite(3, LOW);

digitalWrite(11, LOW);

delay(200);

digitalWrite(2, LOW);

digitalWrite(12, LOW);

delay(200);

digitalWrite(2, HIGH);

digitalWrite(12, HIGH);

delay(200);

digitalWrite(3, HIGH);
digitalWrite(11, HIGH);

delay(200);

digitalWrite(4, HIGH);

digitalWrite(10, HIGH);

delay(200);

digitalWrite(5, HIGH);

digitalWrite(9, HIGH);

delay(200);

digitalWrite(6, HIGH);

digitalWrite(8, HIGH);

delay(200);

digitalWrite(7, HIGH);

delay(200);

digitalWrite(2, LOW);

digitalWrite(12, LOW);

delay(200);

digitalWrite(3, LOW);

digitalWrite(11,LOW);

delay(200);

digitalWrite(4, LOW);

digitalWrite(10, LOW);

delay(200);

digitalWrite(5, LOW);

digitalWrite(9, LOW);

delay(200);

digitalWrite(6, LOW);

digitalWrite(8, LOW);

delay(200);

digitalWrite(7, LOW);

delay(2000);