Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Song.h"
- #define BUZZ 1
- int dick = 0;
- Song s = Song();
- void setup() {
- pinMode(BUZZ, OUTPUT);
- }
- void loop() {
- int note = s.nextNote();
- int len = s.nextLength();
- if (note == -1) {
- noTone(BUZZ);
- } else {
- tone(BUZZ, note);
- }
- delay(len);
- if (s.completed()) {
- noTone(BUZZ);
- s.reset();
- delay(3000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement