Speaker Ascend to Charge : Part Two Bug Hunt! Test your Troubleshooting.

This code will run on Code Speaker, but it’s missing something important. Find it and fix it in this bug hunt.

/* Buggy: 'Ascend to Charge', a popular song during baseball games C,E,G,A,E,G are the notes in order Using variables instead of numbers makes it easier to change the song */ int note = 300; //a variable named note to replace the delay values void setup(){ pinMode(10,OUTPUT); //Set the Speaker as an OUTPUT } void loop(){ tone(10,523); //C delay(note); //Play the note for 150 milliseconds tone(10,659); //E delay(note); tone(10,784); //G delay(note); tone(10,880); //A delay(note*2); //double delay on this note tone(10,659); //E delay(note); tone(10,784); //G delay(note/4); //quadruple delay on the last note noTone(10); delay(5000); //wait 5 seconds before replaying the song } // (c) 2018 Let's Start Coding. License: www.letsstartcoding.com/bsdlicense
 



Need a hint? Click here.