Changing Comments
Next, let's do something different. Let's modify a comment. Go down to the last comment, and change it to say "wait for five seconds" like so:
Before we upload this sketch, what do you think the comment change will do to the behaviour of the Arduino and the blinking LED? Take a good guess, then upload the new sketch.
There was no change! (Click to reveal answer)
Don't forget: the comments in a sketch do not affect the code itself, they are just your notes and are not converted or sent to the Arduino.
Always have accurate comments
But now you have a comment that does not match the statement. Which should annoy you greatly, like an itch you cannot scratch. Comments should always be accurate.
So! Your job, if you choose to accept it, is to now modify the sketch one more time. This time, you will modify a statement to make it so that the comment is correct.
Before you reveal the answers, try to solve this quest on your own and upload the code to your Arduino to test it out.
The statement right before the comment:
delay(500); // wait for five seconds
Text editor powered by tinymce.