Questions
- Answer: Servo motors can be used to control things such as: motorized theatre props, car windows, motorized furniture, blinds, and hydraulic car jacks.
- Answer: The direction the horn angle points.
- Answer: Angular velocity is how fast the horn turns when it’s moving from one position to another, so when it is constant it is the change in angle over time.
- Answer: positive
Exercises
- Answer: Approximately 26 and 128 respectively.
- Answer: 90°
- Answer: Angular velocity ω = (Θf - Θi) / t
ω = (135° - 45°)/1.5 s
ω = 90°/1.5 s
ω = 60°/ s - Answer: Angular velocity ω = (Θf - Θi) / t
ω = (45° - 180°)/2.3 s
ω = -135°/2.3 s
ω ≈ -58.7°/ s
Projects
1. Solution: This script is written for the range of 0° to 45°. Any 45° span is acceptable.
from microbit import * display.off() pin9.set_pull(pin9.NO_PULL) pin6.set_pull(pin6.NO_PULL) pin16.set_analog_period(20) value = 77 while True: state9 = pin9.read_digital() state6 = pin6.read_digital() if state9 is 1: value = value + 1 if value > 51: value = 51 if state6 is 1: value = value - 1 if value < 26: value = 26 pin16.write_analog(value) sleep(20)
2. Solution:
from microbit import * display.off() pin9.set_pull(pin9.NO_PULL) pin6.set_pull(pin6.NO_PULL) pin16.set_analog_period(20) value = 77 while True: state9 = pin9.read_digital() state6 = pin6.read_digital() if state9 is 1: value = value + 1 if value > 128: value = 128 if state6 is 1: value = value - 2 if value < 26: value = 26 pin16.write_analog(value) sleep(20)