Servo

BlocklyProp reference for SERVO blocks

Block and I/O pin availability varies by board type.


Standard servo

This block lauches a processor automatically; using up to 14 servos on different Propeller I/O pins will not launch additional processors.

Use this block with the Parallax Standard Servo (#900-00005) and the Propeller Activity Board WX, Propeller FLiP, S3 Robot, and Other board types. Not available for the Badge board type.

 The standard servo block sends control pulses to position a Parallax Standard Servo.

  1. Set the PIN dropdown to the Propeller I/O pin number connected to the servo's signal pin.
  2. Set the angle for the servo to turn to and hold by inserting a number value in the range of 0 to 180.

Once set, the control pulses will continue until the program encounters another standard servo block or servo disable block for that servo's Propeller I/O pin.


CR servo speed

This block lauches a processor automatically, using up to 14 instances of this block will not launch additional processors.

Use this block with the Parallax Continuous Rotation Servo (#900-00008) and the Activity Board WX, Propeller FLiP, and Other board types. Not available for Badge or Scribbler Robot board types.

The CR servo speed block sends control pulses to a servo connected to PIN selected by the dropdown menu that tells the servo what speed in which direction to turn. Negative speeds turn the CR (Continuous Rotation) servo clockwise, and positive speeds turn the servo counter-clockwise. A speed of 0 (zero) stops the CR servo. The speed can be from -200 to 200.  In most cases, you will notice most of the change in speed from -100 to 100.

The CR servo speed block sends pulses to control speed and direction of a Parallax Continuous Rotation servo.

  1. Set the PIN dropdown to the Propeller I/O pin number connected to the servo's signal pin. Pin availablility will vary with board type.
  2. Set the speed for the servo to rotate by inserting a number value in the range of -200 to +200, though change in speed is most noticeable from -100 to +100.
    • Negative numbers turn the sevo counter-clockwise
    • positive numbers turn the servo clockwise
    • Zero makes the servo hold still.*

Once set, the control pulses will continue until the program encounters another standard servo block or servo disable block for that servo's Propeller I/O pin.

*If your Parallax CR Servo rotates slowly or buzzes when set to zero, you may need to center it. Very gently, insert a Philips tip screwdriver into the access hole in the servo's case and slightly twist the potentiometer until the servo holds still.


CR servo set ramp

Use this block with the Parallax Continuous Rotation Servo (#900-00008) and the Activity Board WX, Propeller FLiP, and Other board types. Not available for Badge or Scribbler Robot board types.

The CR servo set ramp block sets the maximum amount that the CR servo’s speed connected to the PIN specified in the dropdown menu can be changed each update cycle. A rampstep of 1 means that the servo’s speed can only change 1 unit every 20ms - meaning that its response will be very sluggish. A rampstep between 4 and 8 is a good compromise between responsiveness and protecting the servo from sudden speed changes that can damage the servo.


Feedback 360° servo initialize

This block lauches a processor automatically, using up to 4 instances of this block will not launch additional processors.

Use this block with the Parallax Feedback 360° High Speed Servo (#900-00360) and the Activity Board WX, Propeller FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. 

The Feedback 360° servo initialize block sets up communication between the servo and the Propeller micrcontroller. If you forget to use this block in your project, a triangle warning will appear on other Feedback 360° servo blocks as a reminder.

  • Set the PIN dropdown to the Propeller I/O pin connected to the servo's control signal wire — the white wire in the 3-wire cable.
  • Set the FB dropdown to the Propeller I/O pin connected to the servo's feedback signal wire — the single yellow wire.

Feedback 360° servo setup

Use this block with the Parallax Feedback 360° High Speed Servo (#900-00360) and the Activity Board WX, Propeller FLiP, and Other board types. Not available for Badge or Scribbler Robot board types.

The Feedback360° servo setup block sets the maximum value for the servo behavior chosen.

  • First, set the PIN dropdown to the Propeller I/O pin number connected to the servo's control or feedback signal line — either one will work.
  • Then, select behavior from the second drop-down.
    • acceleration: sets how quickly the servo will transition to a new speed setting.
    • max speed: sets the maximum rotation speed (independent of direction).  This block is useful when using a variable or equation block as an input for the Feedback 360° servo set block.
  • Last, set the maximum value in the third field.
    • When acceleration is chosen, this field is a drop-down with options given for acceleration in rotation degrees per second squared.  Options are 600°/s2 , 1200°/s2 , 2400°/s2 , 3600°/s2 , 7800°/s2 , and 7200°/s2 ,
    • When max speed is chosen, this is a type-in field for rotation degrees per second, from 1–1080.  Values outside of that range will be truncated. 

Feedback 360° servo set

Use this block with the Parallax Feedback 360° High Speed Servo (#900-00360) and the Activity Board WX, Propeller FLiP, and Other board types. Not available for Badge or Scribbler Robot board types.

The Feedback360° servo setup block sets the value for the servo behavior chosen.

  • First, set the PIN dropdown to the Propeller I/O pin number connected to the servo's control or feedback signal line — either one will work.
  • Then, select behavior from the second drop-down.
    • speed: sets the continuous rotation speed in degrees per second. Positive values turn counterclockwise and negative values turn clockwise.  When speed is chosen, insert a value block, or any variable or equation that resolves to a value.  Cap the value used here by the project with the Feedback 360° servo setup block.
    • set angle to: sets the servo to the angle specified by the attached value block.  The origin for the angle is the position the servo was in when initialized. Positive values turn counterclockwise and negative values turn clockwise. 
    • change position by: rotates the servo by the number of degrees specified by the attached value block. Positive values turn counterclockwise and negative values turn clockwise. 

Feedback 360° servo get

Use this block with the Parallax Feedback 360° High Speed Servo (#900-00360) and the Activity Board WX, Propeller FLiP, and Other board types. Not available for Badge or Scribbler Robot board types.

The Feedback 360° servo get block provides the angular position of the specified servo.  The origin for the angle is the position the servo was in when initialized.  Set the PIN dropdown to the Propeller I/O pin number connected to the servo's control or feedback signal line — either one will work.


servo disable

The servo disable block stops any servo control signals being sent by the Propeller I/O pin chosen in the dropdown.  The servo disable block does NOT free up the processor that was launched by the Standard servo or CR servo speed block.