Speaker Triple Beep Bug Hunt! Test your Troubleshooting.

This code won’t upload to the Code Speaker, that means that it failed to compile. Compilation is like a ‘spell check’ for the code - the computer is checking to make sure it can understand every command. Just because code compiles, though, doesn’t mean the code will run like you expect it to!

//Buggy: Play tones A, B, and C from a piano in a sequence void setup(){ pinMode(10,OUTPUT); //Set the speaker as an OUTPUT } void loop(){ tone(10,440); //Play a tone of 440 hertz (an A on the piano) on pin 10 delay(500); //delay the program for 1/2 second tone(10,494) //Play a B tone of 494 hertz delay(500); //delay for 1/2 second before the next note tone(10,523); //Play a C tone of 523 hertz delay(500); //wait 1/2 second before the loop starts on line 8 again } // (c) 2018 Let's Start Coding. License: www.letsstartcoding.com/bsdlicense

Need a hint? Click here.