User Manual
30
between 0-4096 in the slot in the red frame.
Driving Servo
In the following we will drive the servo by the PWM port. You may notice that the block
is used instead of - well, both work by PWM control,
but the former is easier to understand for servo control in complex program.
First define two variables. The angle variable is to set the rotational degrees of a servo, when
the number is to specify the number of the servo to drive.
Then under the PiSmart category drag the set servo block out. In the drop-down list you can
select one of the PWM0-PWM7 ports to control the servo. Enter the degree for the servo to
spin in the slot with the red frame below.
SunFounder