Speaker Rising Tone Bug Hunt! Test your Troubleshooting.

Use your purple reference cards to review the formatting for a ‘for’ loop. Then see if you can pinpoint the bug in this program.

// Create a rising tone on the Speaker void setup(){ pinMode(10,OUTPUT); //Set the speaker as an OUTPUT } void loop(){ for( i<800; int i=40; i++){ //start at 40 hertz and play a new tone up to 800 hertz tone(10,i); //play the tone that is equal to the variable 'i' delay(3); //delay 3 milliseconds before starting the 'for' loop again } } // (c) 2018 Let's Start Coding. License: www.letsstartcoding.com/bsdlicense
 



Need a hint? Click here.