Main Content

Servo Write

Drive the servo motor to the specified angle

Add-On Required: This feature requires the Simulink Coder Support Package for NXP FRDM-KL25Z Board add-on.

Library

Simulink Coder Support Package for NXP FRDM-KL25Z Board/ FRDM-TFC Shield

  • Servo Write block

Description

The NXP TFC shield can have up to two servos connected to it.

The Servo Write block drives the servo using a PWM signal with a period of 20ms. This block controls a servo motor between specified minimum and maximum angles. The block clips any value outside the specified range.

During simulations without the hardware, this block does nothing.

Parameters

Servo

Select Servo 0 or Servo 1 motor.

Minimum angle (degrees)

Specify the minimum angle achievable by the Servo motor.

Maximum angle (degrees)

Specify the maximum angle achievable by the Servo motor.

See Also