You are on page 1of 4

1.

How do you connect two leads together using a


breadboard?

Plug the two leads into the same 5-socket row on the
breadboard.

2. What function sets a digital pins direction?

The pinMode function.

3. What function sets pin 13 to 5 V? What function sets it to


0 V?

The digitalWrite function does both, depending on its value


parameter:

4. How can a sketch control the duration of a 5 V signal?

Assuming a pin has just been set high, the delay call can keep it
high for a certain amount of time. Then, a digitalWrite call can
set it low.

5. What are the pulse durations that tell a continuous


rotation servo to turn
a. full speed clockwise,
b. full speed counterclockwise,
c. stay still.
(a)1.3 ms pulses for full speed clockwise

(b)1.7 ms pulses for full speed clockwise

(c)1.5 ms pulses for stay still.

6. Which call would make a servo turn faster?


a. servoLeft.writeMicroseconds(1440) or
b. servoLeft.writeMicroseconds(1420).
Why?

(b) servoLeft.writeMicroseconds(1420). Full speed clockwise is


servoLeft.writeMicroseconds(1300), and stop is
servoLeft.WriteMicroseconds(1500). Since 1420 is further from
stop and closer to full speed, its the correct value for faster
clockwise rotation even though it is smaller.

7. How can a sketch control the duration of a certain servo


signal?

Servo.writeMicroseconds(value) followed by delay(ms)


followed by Servo.writeMicroseconds(newValue) or
Servo.detach(pin) will keep the servo turning for ms
milliseconds.

You might also like