Paso 5: Poniéndolo todo junto
1) utilicé algunos cables de las luces muertas para conectar todos los aspectos positivos en el pcb (imagen 1)
2) obtener los conectores crimp y conectar algunos sobre los cables provenientes de los árboles como (imagen 2) dejar el blanco ser por ahora
3) Conecte los cables a la placa en el orden correcto
4) tomé un viejo cable de exstention y cortar el cable y conecta un extremo a la entrada de 120 v en el pcb y el otro a los 2 blancos
5) por último conectar el arduino a la placa (imagen 3)
6) cinta ésos conexión y guárdela en lugar seguro
7) cargar el código de Joy To The World y ver si funciona. Si tan grande!!!!!! Si no, no sea bueno. Si usted no puede averiguar el problema enviar un comentario y mal intenta mi mejor esfuerzo en ayudarle.
Código de Joy To The World:
tree1 int = 6;
tree2 int = 7;
int tree3 = 8;
int tree4 = 9;
int tree5 = 2;
int tree6 = 3;
int tree7 = 4;
int tree8 = 5;
int s = 150;
int ds = 225;
int e = 300;
de int = 450;
int q = 600;
int dq = 900;
int h = 1200;
int dh = 1800;
int comienzo;
int fin;
int tiempo;
void setup()
{
pinMode (tree1, salida);
pinMode (tree2, salida);
pinMode (tree3, salida);
pinMode (tree4, salida);
pinMode (tree5, salida);
pinMode (tree6, salida);
pinMode (tree7, salida);
pinMode (tree8, salida);
digitalWrite(tree1,HIGH);
Delay(1000);
digitalWrite(tree2,HIGH);
Delay(1000);
digitalWrite(tree3,HIGH);
Delay(1000);
digitalWrite(tree4,HIGH);
Delay(1000);
digitalWrite(tree5,HIGH);
Delay(1000);
digitalWrite(tree6,HIGH);
Delay(1000);
digitalWrite(tree7,HIGH);
Delay(1000);
digitalWrite(tree8,HIGH);
Delay(1000);
digitalWrite(tree1,LOW);
digitalWrite(tree2,LOW);
digitalWrite(tree3,LOW);
digitalWrite(tree4,LOW);
digitalWrite(tree5,LOW);
digitalWrite(tree6,LOW);
digitalWrite(tree7,LOW);
digitalWrite(tree8,LOW);
Serial.Begin(9600);
}
void loop()
{
Start = millis();
digitalWrite (tree1, HIGH);
digitalWrite (tree8, HIGH);
Delay(q);
digitalWrite (tree1, LOW);
digitalWrite (tree8, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(de);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(s);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
Delay(1050);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree8, HIGH);
Delay(s);
digitalWrite (tree1, LOW);
digitalWrite (tree8, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(q);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(q);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
Delay(DQ);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree8, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
digitalWrite (tree7, HIGH);
Delay(DQ);
digitalWrite (tree2, LOW);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree7, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree8, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
digitalWrite (tree6, HIGH);
Delay(DQ);
digitalWrite (tree3, bajo);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree8, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree2, HIGH);
digitalWrite (tree3, HIGH);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
digitalWrite (tree6, HIGH);
digitalWrite (tree7, HIGH);
digitalWrite (tree8, HIGH);
Delay(DQ);
digitalWrite (tree1, LOW);
digitalWrite (tree2, LOW);
digitalWrite (tree3, bajo);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree7, bajo);
digitalWrite (tree8, bajo);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree8, bajo);
digitalWrite (tree1, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree7, HIGH);
Delay(e);
digitalWrite (tree7, bajo);
digitalWrite (tree2, HIGH);
Delay(e);
digitalWrite (tree2, LOW);
digitalWrite (tree6, HIGH);
Delay(e);
digitalWrite (tree6, bajo);
digitalWrite (tree3, HIGH);
Delay(de);
digitalWrite (tree3, bajo);
digitalWrite (tree5, HIGH);
Delay(s);
digitalWrite (tree5, bajo);
digitalWrite (tree4, HIGH);
Delay(e);
digitalWrite (tree4, bajo);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree8, bajo);
digitalWrite (tree1, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree7, HIGH);
Delay(e);
digitalWrite (tree7, bajo);
digitalWrite (tree2, HIGH);
Delay(e);
digitalWrite (tree2, LOW);
digitalWrite (tree6, HIGH);
Delay(e);
digitalWrite (tree6, bajo);
digitalWrite (tree3, HIGH);
Delay(de);
digitalWrite (tree3, bajo);
digitalWrite (tree5, HIGH);
Delay(s);
digitalWrite (tree5, bajo);
digitalWrite (tree4, HIGH);
Delay(e);
digitalWrite (tree4, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(e);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree8, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(e);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree8, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(75);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(75);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
Delay(DQ);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
Delay(75);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(75);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
Delay(e);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(e);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
Delay(e);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(75);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(75);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree8, HIGH);
Delay(DQ);
digitalWrite (tree1, LOW);
digitalWrite (tree8, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
digitalWrite (tree8, HIGH);
Delay(75);
digitalWrite (tree1, LOW);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree8, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
digitalWrite (tree7, HIGH);
Delay(75);
digitalWrite (tree2, LOW);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree7, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
digitalWrite (tree6, HIGH);
Delay(e);
digitalWrite (tree3, bajo);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree2, HIGH);
digitalWrite (tree3, HIGH);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
digitalWrite (tree6, HIGH);
digitalWrite (tree7, HIGH);
digitalWrite (tree8, HIGH);
Delay(q);
digitalWrite (tree1, LOW);
digitalWrite (tree2, LOW);
digitalWrite (tree3, bajo);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree7, bajo);
digitalWrite (tree8, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree8, HIGH);
Delay(e);
digitalWrite (tree1, LOW);
digitalWrite (tree8, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(de);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(s);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
Delay(e);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree3, HIGH);
digitalWrite (tree6, HIGH);
Delay(e);
digitalWrite (tree3, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree2, HIGH);
digitalWrite (tree7, HIGH);
Delay(q);
digitalWrite (tree2, LOW);
digitalWrite (tree7, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree8, HIGH);
Delay(q);
digitalWrite (tree1, LOW);
digitalWrite (tree8, bajo);
digitalWrite (tree1, HIGH);
digitalWrite (tree2, HIGH);
digitalWrite (tree3, HIGH);
digitalWrite (tree4, HIGH);
digitalWrite (tree5, HIGH);
digitalWrite (tree6, HIGH);
digitalWrite (tree7, HIGH);
digitalWrite (tree8, HIGH);
Delay(h);
digitalWrite (tree1, LOW);
digitalWrite (tree2, LOW);
digitalWrite (tree3, bajo);
digitalWrite (tree4, bajo);
digitalWrite (tree5, bajo);
digitalWrite (tree6, bajo);
digitalWrite (tree7, bajo);
digitalWrite (tree8, bajo);
Delay(20000);
final = millis();
tiempo = final - inicio;
Serial.println(Time);
}