Servo Set Pulse

Configure the specified pin as analog output, set the period to 20 ms, and set the pulse width to the specified value.

pins.servoSetPulse(AnalogPin.P1, 1500)

Parameters

Example

The following code sets the servo pulse to 1000 microseconds.

pins.servoSetPulse(AnalogPin.P1, 1000)

See also

Calliope mini pins, on pin pressed, analog read pin, digital read pin, digital write pin

Edit this page on GitHub