Professional Documents
Culture Documents
Exercises
1. Write a statement that makes a tone, one that sounds different from the start-
alert tone, to signify the end of a sketch. tone(4, 6000, 2000)
2. Write a statement that plays a speaker tone to signify an intermediate step in
the sketch. This tone should be different from a start-alert or end tone. tone(4, 2000,
900)
Projects
1. Modify the TestServoSpeed sketch so that it makes a tone signifying each
test is complete.
Serial.println("Running...");
servoLeft.writeMicroseconds(pulseWidth); // Pin 13 servo speed =
pulse
delay(6000); // ..for 6 seconds
servoLeft.writeMicroseconds(1500); // Pin 13 servo speed = stop
tone(4, 6000, 900)
}
}
2. Modify the TestServoSpeed sketch so that it runs both wheels instead of just
one with each test. Make the right wheel turn the opposite direction from the left
wheel.
3.