int pinled;
int pausaIda=500;
int pausaVuelta=500;
void setup()
{
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
}
void loop()
{
for (pinled = 9; pinled <= 13; pinled++)
{
digitalWrite(pinled, HIGH);
delay(pausaIda);
digitalWrite(pinled, LOW);
}
for (pinled = 13; pinled >= 9; pinled--)
{
digitalWrite(pinled, HIGH);
delay(pausaVuelta);
digitalWrite(pinled, LOW);
}
}
No hay comentarios:
Publicar un comentario