Paso 8: código
He pegado algunos efectos gratis que he hecho yo. Es fácil hacer su propio aunque! Gracias por leer y divertirse! Quiero crear más de theise y crear una cadena de barras de iluminación led con este ser el maestro y los demás ser esclavos. :)Un guión fresco pequeño show de luz---
Boceto para la barra de luz led
6 series de 4 leds
Por Charlie Bolland
int led1 = 13;
int led2 = 12;
led3 int = 11;
led4 int = 10;
led5 int = 9;
led6 int = 8;
void setup() {}
pinMode (led1, salida);
pinMode (led2, salida);
pinMode (led3, salida);
pinMode (led4, salida);
pinMode (led5, salida);
pinMode (led6, salida);
Serial.Begin(9600);
}
void loop() {}
Serial.println(LED1);
Delay(1);
Serial.println(LED2);
Delay(1);
Serial.println(LED3);
Delay(1);
Serial.println(LED4);
Delay(1);
Serial.println(LED5);
Delay(1);
Serial.println(led6);
Delay(1);
digitalWrite (LED 1, HIGH); Inicio
Delay(250); Efecto desplazamiento 1
digitalWrite (LED 1, bajo);
digitalWrite (led2, HIGH);
Delay(250);
digitalWrite (led2, LOW);
digitalWrite (LED 3, alto);
Delay(250);
digitalWrite (LED 3, bajo);
digitalWrite (led4, HIGH);
Delay(250);
digitalWrite (led4, LOW);
digitalWrite (led5, HIGH);
Delay(250);
digitalWrite (led5, LOW);
digitalWrite (led6, HIGH);
Delay(250);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led4, HIGH); Efecto desplazamiento 2
Delay(250);
digitalWrite (LED 1, bajo);
digitalWrite (led4, LOW);
digitalWrite (led2, HIGH);
digitalWrite (led5, HIGH);
Delay(250);
digitalWrite (led2, LOW);
digitalWrite (led5, LOW);
digitalWrite (LED 3, alto);
digitalWrite (led6, HIGH);
Delay(250);
digitalWrite (LED 3, bajo);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led4, HIGH); Efecto desplazamiento 2
Delay(250);
digitalWrite (LED 1, bajo);
digitalWrite (led4, LOW);
digitalWrite (led2, HIGH);
digitalWrite (led5, HIGH);
Delay(250);
digitalWrite (led2, LOW);
digitalWrite (led5, LOW);
digitalWrite (LED 3, alto);
digitalWrite (led6, HIGH);
Delay(250);
digitalWrite (LED 3, bajo);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
Delay(250); Efecto desplazamiento 1
digitalWrite (LED 1, bajo);
digitalWrite (led2, HIGH);
Delay(250);
digitalWrite (led2, LOW);
digitalWrite (LED 3, alto);
Delay(250);
digitalWrite (LED 3, bajo);
digitalWrite (led4, HIGH);
Delay(250);
digitalWrite (led4, LOW);
digitalWrite (led5, HIGH);
Delay(250);
digitalWrite (led5, LOW);
digitalWrite (led6, HIGH);
Delay(250);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led4, HIGH); Efecto desplazamiento 2
Delay(250);
digitalWrite (LED 1, bajo);
digitalWrite (led4, LOW);
digitalWrite (led2, HIGH);
digitalWrite (led5, HIGH);
Delay(250);
digitalWrite (led2, LOW);
digitalWrite (led5, LOW);
digitalWrite (LED 3, alto);
digitalWrite (led6, HIGH);
Delay(250);
digitalWrite (LED 3, bajo);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led4, HIGH); Efecto desplazamiento 2
Delay(250);
digitalWrite (LED 1, bajo);
digitalWrite (led4, LOW);
digitalWrite (led2, HIGH);
digitalWrite (led5, HIGH);
Delay(250);
digitalWrite (led2, LOW);
digitalWrite (led5, LOW);
digitalWrite (LED 3, alto);
digitalWrite (led6, HIGH);
Delay(250);
digitalWrite (LED 3, bajo);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
Delay(50); Efecto estroboscópico
digitalWrite (LED 1, bajo);
digitalWrite (led2, HIGH);
Delay(50);
digitalWrite (led2, LOW);
digitalWrite (LED 3, alto);
Delay(50);
digitalWrite (LED 3, bajo);
digitalWrite (led4, HIGH);
Delay(50);
digitalWrite (led4, LOW);
digitalWrite (led5, HIGH);
Delay(50);
digitalWrite (led5, LOW);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
Delay(50); Efecto estroboscópico
digitalWrite (LED 1, bajo);
digitalWrite (led2, HIGH);
Delay(50);
digitalWrite (led2, LOW);
digitalWrite (LED 3, alto);
Delay(50);
digitalWrite (LED 3, bajo);
digitalWrite (led4, HIGH);
Delay(50);
digitalWrite (led4, LOW);
digitalWrite (led5, HIGH);
Delay(50);
digitalWrite (led5, LOW);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
Delay(50); Efecto estroboscópico
digitalWrite (LED 1, bajo);
digitalWrite (led2, HIGH);
Delay(50);
digitalWrite (led2, LOW);
digitalWrite (LED 3, alto);
Delay(50);
digitalWrite (LED 3, bajo);
digitalWrite (led4, HIGH);
Delay(50);
digitalWrite (led4, LOW);
digitalWrite (led5, HIGH);
Delay(50);
digitalWrite (led5, LOW);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
Delay(50); Efecto estroboscópico
digitalWrite (LED 1, bajo);
digitalWrite (led2, HIGH);
Delay(50);
digitalWrite (led2, LOW);
digitalWrite (LED 3, alto);
Delay(50);
digitalWrite (LED 3, bajo);
digitalWrite (led4, HIGH);
Delay(50);
digitalWrite (led4, LOW);
digitalWrite (led5, HIGH);
Delay(50);
digitalWrite (led5, LOW);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
digitalWrite (LED 1, HIGH); Inicio
digitalWrite (led2, HIGH); Efecto de strobo 2
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(50);
digitalWrite (led6, LOW);
digitalWrite (led5, LOW);
digitalWrite (led4, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 1, bajo);
Delay(50); Final
}
Cosa fresca en tipo efecto estroboscópico.
Boceto para la barra de luz led
6 series de 4 leds
Por Charlie Bolland
int led1 = 13;
int led2 = 12;
led3 int = 11;
led4 int = 10;
led5 int = 9;
led6 int = 8;
void setup() {}
pinMode (led1, salida);
pinMode (led2, salida);
pinMode (led3, salida);
pinMode (led4, salida);
pinMode (led5, salida);
pinMode (led6, salida);
Serial.Begin(9600);
}
void loop() {}
digitalWrite (LED 1, HIGH);
Delay(25);
digitalWrite (LED 1, bajo);
Delay(25);
digitalWrite (LED 3, alto);
Delay(25);
digitalWrite (LED 3, bajo);
Delay(100);
digitalWrite (led6, HIGH);
Delay(25);
digitalWrite (LED 1, HIGH);
digitalWrite (led2, HIGH);
digitalWrite (LED 3, alto);
digitalWrite (led4, HIGH);
digitalWrite (led5, HIGH);
digitalWrite (led6, HIGH);
Delay(25);
digitalWrite (LED 1, bajo);
digitalWrite (led2, LOW);
digitalWrite (LED 3, bajo);
digitalWrite (led4, LOW);
digitalWrite (led5, LOW);
digitalWrite (led6, LOW);
}