You are on page 1of 3

R20-A3-T4-23 - Seis leds en secuencia

Centro de diseño y metrología

Yimmy Alexander Matallana Niño

Diseño e integración de automatismos mecatrónicos

2670704

Instructor: Julio Gregorio Blanco Beltrán


Actividad 1
https://www.tinkercad.com/things/8W3yy34HFxQ-powerful-maimu/editel?tenant=circuits

// C++ code

//

void setup()

int Led = 0;

for (Led = 4; Led < 10; Led++)

pinMode(Led, OUTPUT);

}
void loop()

int paso = 2;

for (int Led = 4; Led < 7; Led++)

digitalWrite(Led, HIGH);

digitalWrite(Led + 2 * paso + 1, HIGH);

delay(500);

digitalWrite(Led, LOW);

digitalWrite(Led + 2 * paso + 1, LOW);

delay(500);

paso--;

paso=0;

for (int Led = 6; Led > 3; Led--)

digitalWrite(Led, HIGH);

digitalWrite(Led + 2 * paso + 1, HIGH);

delay(500);

digitalWrite(Led, LOW);

digitalWrite(Led + 2 * paso + 1, LOW);

delay(500);

paso++;

You might also like