Solutions

Questions

  1. Answer: Engineers and technicians who work with motors.  
  2. Answer: It is called the pulse width.
  3. Answer: It is narrower for the 45° angle.
  4. Answer: period
  5. Answer: The signal periods will be the same.


Exercises

  1. Answer: It makes the micro:bit send on/off (or high/low) signals to the servo.
  2. Answer: The angle is determined by how long the on (or high) signal stays on.
  3. Answer: To calculate the frequency, use f = 1 / T, with T being the signal period.  
  4. Answer:
    y = 0.5689x + 25.6
    y = 0.5689 * 15 + 25.6
    y = 34.1335 ≈ 34    


Project

Solution:

y = 0.5689x + 25.6
y = 0.5689(15) + 25.6
y = 34.1335 ≈ 34

# servo_plot

from microbit import *
from multimeter import *

display.off()
pin16.set_analog_period(20)

while True:
    pin16.write_analog(26)     
    plot_servo(ch2="servo", delay=40)
    sleep(4000)  
    pin16.write_analog(34)
    plot_servo(ch2="servo", delay=40)
    sleep(4000)

The pulse width should be approx. 0.2 ms