===== Adding a servo ===== ==== Connecting a servo with alligator clips ==== You need: * 1 standard servo * 3 wires with an alligator clip on one end and a male jumper on the other end (in black, red, and orange/yellow) {{:en:extensions:servo_1.jpg?600|}} \\ To connect the servo: * Plug the wires to the connector of the servo: black to brown, red to red, yellow to orange. * Clip the wires to the pins of the Kniwwelino: * The **black** one to the **GND pin** * The **red** one to the **3.3V pin** * The **yellow** one to either **D5, D6 or D7** {{:en:extensions:servo_2.jpg?600|}} ==== Programming servos ==== You can program your servo with the following block. {{:en:programmingblocks:servo_1.png|}} Select the pin to which you connected your servo to (D5, D6 or D7), and set the angle to which you seek to rotate the servo. The range here needs to be between 0 and 180. For example, to set the servo on three different positions (0; 90; 180) depending on which button was clicked, you could use the following code: {{:en:programmingblocks:servo_example.png|}}