Stap 3: Code
Klik op deze link voor een duidelijke weergave van code
programma
zwarte draad aan grond int speakerPin = 8; //red draad verbinden met pin 8
VOID Setup {}
pinMode(speakerPin,OUTPUT); } void loop {Toon (speakerPin, 2601); / / m delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 8012); een delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 5092); h delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 1202); e de delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 6028); s delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 5092); h delay(1000); noTone(speakerPin); delay(1500);
////////////////////////////////////////
Toon (speakerPin, 7031); Ik delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 6028); s delay(1000); noTone(speakerPin); delay(1500);
////////////////////////////////////////////
Toon (speakerPin, 2071); c delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 7068); o delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 7068); o delay(1000); noTone(speakerPin); delay(500);
Toon (speakerPin, 3098); l delay(1000); noTone(speakerPin); delay(1500);
}