Turn a Servo

To turn a servo you will need the Crickit controller and  you will need to have the Crickit extension loaded in the MakeCode editor.  

Locate the servo block on the Crickit.  Your servo will have a 3-pin connector with either brown, red, and yellow wires or black, red, and white wires.  

Connect the servo to the pins next to the 1 in the servo block.  The lightest colored wire should be connected to the signal pin (the pin closest to the 1) on the Crickit with the darkest (brown or black) connected to the G (the most inward pin).

If you have installed the Cricket extension in MakeCode, you should have a green CRICKIT block group available.  Clicking on that group reveals various blocks for Crickit capabilities including those related to servo control.

Moving the Servo via Buttons

Drag the input “on button pressed” block into your programming area

set button to A

Drag the crickit “set servo block” into the “on button” block

set servo to 1 and angle to 0′

Drag another input “on button pressed” block into your programming area

set button to B

Drag another crickit “set servo block” into the new “on button” block

set servo to 1 and angle to 180′