Science Oxford Logo

Adding a servo motor

A servo motor can move 180 degrees, and is very precise.


You will need:
  1. Connect the black crocodile clip to the pin labelled GND.
  2. Connect the red crocodile clip to the pin labelled 3V.
  3. Connect the white crocodile clip to the pin labelled 0.
photo of connections, as described above

Test out your motor, then think about what problems you could solve with movement!


Example code

To use servo motors in your code, you can add the servo extension.

In the MakeCode blocks menu, click + Extensions, and choose the servo option. You will now have new blocks to use in your menu!


What can you use this for?

As well as the Conditionals in the Logic menu, you can combine Comparison and Boolean blocks to make a really interesting program!


What problems could you solve using a servo motor?