Servo motor drive using Arduino

Challenge level [1/10]

This is another easy to implement project.

Requirements:

1. Arduino

2. Servo motor

Setup:

Red wire is connect to the 5v pin, the ground is the black one. The control wire which is usually yellow or white is connected to the PWM able pin number 9.

[Code]

P.S. In the case of using continuous motion servo, the writeMicoseconds() can control the speed by assigning 1000 to have a full speed counter-clockwise motion, or 2000 to have a full speed clockwise motion. Same thing in the case of using command write() with 0 and 180 respectively.

PPS. In theory setting 90 or 1500 should set the position to the middle, however, fine tuning sometimes required in the example the mid position point was 81.

Leave a Reply