Hands and feet · Robot club · about 15 min
Angles, speed, what a servo can and cannot do.
[1 mark]What does the number 90 mean in servo(0, 90)?
[1 mark]Which servo works which attachment on BugBot?
[1 mark]What does this program print?
for angle in range(0, 181, 45):
print("servo 0 at", angle)[1 mark]A hobby servo turns about 60 degrees in a tenth of a second. About how many seconds does it take to swing from 0 to 180? Give your answer to one decimal place.
[1 mark]A program runs servo(0, 180) and on the very next line servo(0, 0), with no wait between. What does servo 0 do?
[1 mark]Which of these can a normal (not continuous-rotation) servo NOT do?
Tick every answer that is true.
[1 mark]What does this program print?
for angle in range(180, -1, -60):
print(angle)Move servo 0 to 0, 45, 90, 135 and 180 in turn, printing servo 0 at <angle> each time. Do not drive.
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
# servo 0 to 90 degrees
servo(0, 90)
print("servo 0 at", 90)Plan your program here, then type it in and press Run.
servo(1, 90).slowly(index, angle) that moves a servo to an angle in steps of 5 degrees with a short wait between each.