Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int speakerPin = 8;
- void setup() {
- pinMode(speakerPin, OUTPUT);
- }
- //Take on me
- void loop() {
- tone(speakerPin, 392, 200); // plays note G of 262Hz for 200ms
- delay(250); // wait 250 ms
- tone(speakerPin, 392, 200); // plays note G of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 330, 200); // plays note E of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 262, 300); // plays note C of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 262, 300); // plays note C of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 349, 300); // plays note F of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 349, 200); // plays note F of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 349, 200); // plays note F of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 440, 200); // plays note A of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 440, 200); // plays note A of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 493, 200); // plays note B of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 523, 200); // plays note C of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 523, 200); // plays note C of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 523, 200); // plays note C of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 523, 200); // plays note C of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 392, 300); // plays note G of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 349, 300); // plays note F of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 440, 200); // plays note A of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 440, 200); // plays note A of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 440, 200); // plays note A of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 392, 200); // plays note G of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 392, 200); // plays note G of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 440, 200); // plays note G of 262Hz for 200ms
- delay(250);
- tone(speakerPin, 392, 200); // plays note A of 262Hz for 200ms
- delay(250);
- }
Add Comment
Please, Sign In to add comment