This example shows how to rotate a servo motor by its maximum angle.
mypi = raspi();
Configure a servo object using the PWM pin 9 and set the
minimum pulse duration to
1e-3 seconds and the
maximum pulse durations to
s = servo(mypi, 12, 'MinPulseDuration', 1e-3, 'MaxPulseDuration', 2e-3);
Write 1, to turn the motor by the maximum angle.
The angle depends on device pulse duration. Refer to your device data sheet for valid pulse duration values.