Stap 5: Brengt het allemaal samen
1) ik enkele draad van de dode lichten gebruikt om te verbinden alle de positieven op de pcb (afbeelding 1)
2) krijgen de plooi connectoren en sluit sommige op de draden vanuit de bomen zoals (afbeelding 2) verlof worden de witte voor nu
3) sluit die draden aan op de pcb in de juiste volgorde
4) Ik nam een oude exstention-snoer en het snoer afgesneden en één uiteinde aangesloten op de ingang van de 120v op de pcb en anderzijds aan de 2 blanken
5) tot slot sluit de arduino tot de pcb (afbeelding 3)
6) tape die verbinding en op te slaan ergens veilig
7) uploaden de Joy To The World-code, en zien of het werkt. Als zo groot! zo niet, niet goed. Als u het probleem niet achterhalen een commentaar en ziek probeer mijn best te helpen u.
Joy To The World-code:
int tree1 = 6;
int tree2 = 7;
int voorkomen3 = 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;
int de = 450;
int q = 600;
int dq = 900;
int h = 1200;
int dh = 1800;
int begin;
int einde;
int de tijd;
VOID Setup
{
pinMode (tree1, OUTPUT);
pinMode (tree2, OUTPUT);
pinMode (voorkomen3, OUTPUT);
pinMode (tree4, OUTPUT);
pinMode (tree5, OUTPUT);
pinMode (tree6, OUTPUT);
pinMode (tree7, OUTPUT);
pinMode (tree8, OUTPUT);
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, hoge);
digitalWrite (tree8, hoge);
delay(q);
digitalWrite (tree1, laag);
digitalWrite (tree8, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(de);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay;
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
delay(1050);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree8, hoge);
delay;
digitalWrite (tree1, laag);
digitalWrite (tree8, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(q);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay(q);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
delay(DQ);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree8, laag);
digitalWrite (tree2, hoge);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
digitalWrite (tree7, hoge);
delay(DQ);
digitalWrite (tree2, laag);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree7, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree8, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
digitalWrite (tree6, hoge);
delay(DQ);
digitalWrite (voorkomen3, laag);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree6, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree8, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree2, hoge);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
digitalWrite (tree6, hoge);
digitalWrite (tree7, hoge);
digitalWrite (tree8, hoge);
delay(DQ);
digitalWrite (tree1, laag);
digitalWrite (tree2, laag);
digitalWrite (voorkomen3, laag);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree6, laag);
digitalWrite (tree7, laag);
digitalWrite (tree8, laag);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree8, laag);
digitalWrite (tree1, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree7, hoge);
delay(e);
digitalWrite (tree7, laag);
digitalWrite (tree2, hoge);
delay(e);
digitalWrite (tree2, laag);
digitalWrite (tree6, hoge);
delay(e);
digitalWrite (tree6, laag);
digitalWrite (voorkomen3, hoge);
delay(de);
digitalWrite (voorkomen3, laag);
digitalWrite (tree5, hoge);
delay;
digitalWrite (tree5, laag);
digitalWrite (tree4, hoge);
delay(e);
digitalWrite (tree4, laag);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree8, laag);
digitalWrite (tree1, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree7, hoge);
delay(e);
digitalWrite (tree7, laag);
digitalWrite (tree2, hoge);
delay(e);
digitalWrite (tree2, laag);
digitalWrite (tree6, hoge);
delay(e);
digitalWrite (tree6, laag);
digitalWrite (voorkomen3, hoge);
delay(de);
digitalWrite (voorkomen3, laag);
digitalWrite (tree5, hoge);
delay;
digitalWrite (tree5, laag);
digitalWrite (tree4, hoge);
delay(e);
digitalWrite (tree4, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(e);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree8, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(e);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree8, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(75);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay(75);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
delay(DQ);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
delay(75);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay(75);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
delay(e);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay(e);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
delay(e);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay(75);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(75);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree8, hoge);
delay(DQ);
digitalWrite (tree1, laag);
digitalWrite (tree8, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
digitalWrite (tree8, hoge);
delay(75);
digitalWrite (tree1, laag);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree8, laag);
digitalWrite (tree2, hoge);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
digitalWrite (tree7, hoge);
delay(75);
digitalWrite (tree2, laag);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree7, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
digitalWrite (tree6, hoge);
delay(e);
digitalWrite (voorkomen3, laag);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree6, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree2, hoge);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
digitalWrite (tree6, hoge);
digitalWrite (tree7, hoge);
digitalWrite (tree8, hoge);
delay(q);
digitalWrite (tree1, laag);
digitalWrite (tree2, laag);
digitalWrite (voorkomen3, laag);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree6, laag);
digitalWrite (tree7, laag);
digitalWrite (tree8, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree8, hoge);
delay(e);
digitalWrite (tree1, laag);
digitalWrite (tree8, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(de);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay;
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
delay(e);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree6, hoge);
delay(e);
digitalWrite (voorkomen3, laag);
digitalWrite (tree6, laag);
digitalWrite (tree2, hoge);
digitalWrite (tree7, hoge);
delay(q);
digitalWrite (tree2, laag);
digitalWrite (tree7, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree8, hoge);
delay(q);
digitalWrite (tree1, laag);
digitalWrite (tree8, laag);
digitalWrite (tree1, hoge);
digitalWrite (tree2, hoge);
digitalWrite (voorkomen3, hoge);
digitalWrite (tree4, hoge);
digitalWrite (tree5, hoge);
digitalWrite (tree6, hoge);
digitalWrite (tree7, hoge);
digitalWrite (tree8, hoge);
delay(h);
digitalWrite (tree1, laag);
digitalWrite (tree2, laag);
digitalWrite (voorkomen3, laag);
digitalWrite (tree4, laag);
digitalWrite (tree5, laag);
digitalWrite (tree6, laag);
digitalWrite (tree7, laag);
digitalWrite (tree8, laag);
delay(20000);
einde = millis();
tijd = einde - start;
Serial.println(time);
}