Vorpal Robotics Wiki
Log in

Vorpal Hexapod Scratch Block Reference

From Vorpal Robotics Wiki

Introduction

This page gives you a quick explanation of every Scratch block in the Vorpal Scratch Extension. In each section, the images on the right show you how the block looks in Scratch. Note that all the Vorpal Extension blocks will be listed under the "Other Blocks" section of Scratch.


Reset Connection

Reset Connection
  • What it does: This block resets the serial port connecting Scratch to the Vorpal Gamepad and attempts to reconnect.
  • When to use it: You don't usually need to use this command at all; it's just for cases where you're having trouble connecting to the robot. The Reset Connection block is typically executed by itself outside of any other program. It's convenient to just drag this block out onto the programming area and leave it in a corner. If you have trouble with your connection just click on it to execute. Another time you might need this is in cases where you disconnect the gamepad USB from the computer to try something out, then reconnect again later. If you do use this in a program, typically it is placed immediately after whatever action starts your program (such as clicking on the green flag). It is suggested that you place a wait for 5 seconds command after it, giving the connection time to fully reset before continuing.
  • Options and Menus: This block has no options or menus, so it is very easy to use!
  • Other Notes: You should not place this block in a loop or otherwise cause it to be executed more than once in any program. Doing so would cause undesirable delays and could also flush incoming sensor data that arrives while the connection is being reset.

Walk

Walk
  • What it does: This block triggers actions that are identical to the Vorpal Gamepad "W" (Walk) line of mode buttons.
  • When to use it: When you wish to move the robot in a way that is identical to the gamepad "W" mode buttons. Note that to create custom variations of walk commands that only differ in the amount of movement of hips and knees, leaning, or timing factors, use the GAIT block instead.
  • Options and Menus:
    • Walking Style: This is the first (leftmost) pulldown menu on the block. The walking styles correspond to the W1, W2, W3, and W4 gamepad buttons. For example, selecting "scamper" from the walking style menu results in the same walking motion as triggered by the W4 mode button on the gamepad. The styles are:
      • normal: medium speed normal tripod walking gait.
      • high knees: slow because it raises hips as high as possible; good for getting over obstacles.
      • small steps: takes tiny little steps, allowing you to finely adjust Vorpal's position.
      • scamper: moves as quickly as possible by overlapping hip and knee motions and barely raising the knees. This makes it somewhat unstable, and it may drift left or right on slippery surfaces. If you want to get somewhere as quickly as possible, however, this is the mode to use.
    • Walking Direction: This is the second menu on the block. These selections allow you to simulate DPAD button presses to move Vorpal in different directions. Note that the special value "Stop" is equivalent to no DPAD buttons being pressed. This allows you to make the robot stand in the same manner as it does during walk modes where no DPAD button is pressed.
      • forward: walk forward (in the direction of the accessory port)
      • backward: walk backward (in the direction of the dial knob)
      • left: turn in place counter-clockwise (when viewed from above)
      • right: turn in place clockwise (when viewed from above)
      • stomp/honk: stomp the feet without moving anywhere, and beep the horn. Often used to voice displeasure.
      • stop: just stand there with the knees and hips at the neutral position for walking
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: The walk block will automatically time sequence the legs, so it is a very easy way to make Vorpal walk around if the gamepad styles of walking suit your needs.

Dance

Dance
  • What it does: This block triggers actions that are identical to the Vorpal Gamepad "D" (Dance) line of mode buttons.
  • When to use it: When you wish to move the robot in a way that is identical to the gamepad "D" mode buttons.
  • Options and Menus:
    • Dancing Style: This is the pulldown menu on the block. The dancing styles correspond to the dance moves that can be executed using gamepad buttons. The styles are:
      • twist: while standing, move hips back and forth
      • twist on floor: while holding all legs up in the air, move hips back and forth
      • twist legs up: while holding three legs (every other leg) up in the air, move hips back and forth
      • twist other legs up: while holding the opposite three legs up in the air, move hips back and forth
      • dab: pick up one leg and twist to the side, as in the popular dance move
      • ballet flutter: go up "en pointe" (on tiptoes) like a ballerina and flutter all legs back and forth while staying in place
      • ballet left: go up "en pointe" (on tiptoes) like a ballerina and flutter all legs back and forth while moving to the left
      • ballet right: go up "en pointe" (on tiptoes) like a ballerina and flutter all legs back and forth while moving to the right
      • ballet forward: go up "en pointe" (on tiptoes) like a ballerina and flutter all legs back and forth while moving forward
      • ballet backward: go up "en pointe" (on tiptoes) like a ballerina and flutter all legs back and forth while moving backward
      • wave teeter: rock from side to side
      • wave totter: rock from front to back
      • wave ripple: sit on the floor and lift legs one by one in sequence
      • wave swirl left: lean slightly in one direction and then leaning progresses in a counter-clockwise circle
      • wave swirl right: lean slightly in one direction and then leaning progresses in a clockwise circle
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: This is a very easy way to make a fun and engaging routine for Vorpal without needing to individually program each leg. It can also be used to create a "victory dance" at the end of a program!

Fight With Arms

Fight with Arms
  • What it does: This block triggers actions that are identical to the first and second mode buttons in the Vorpal Gamepad "F" (Fight) line.
  • When to use it: When you wish to move the robot in a way that is identical to the first and second gamepad "F" mode buttons.
  • Options and Menus:
    • Arm Style: This is the first (leftmost) pulldown menu on the block. The arm styles correspond to the F1 and F2 gamepad buttons. The styles are:
      • single arms: This results in the same fighting motion as triggered by the F1 mode button on the gamepad. Each of the front arms will move individually.
      • unison arms: This results in the same fighting motion as triggered by the F2 mode button on the gamepad. The front arms will move in unison.
    • Movement: This is the second menu on the block. These selections allow you to simulate DPAD button presses to move Vorpal in different directions. The movements will be executed with either one or both front arms, depending on your selection in the previous menu.
      • defend: puts front legs out in front of the robot
      • lefthook: punch to the left
      • righthook: punch to the right
      • uppercut: punch upwards
      • downsweep: sweep arms downwards
      • auto ninja: executes a series of preprogrammed moves designed to dazzle the opponent
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.

Fight Adjust

Fight Adjust Block
  • What it does: This block triggers actions that are identical to the third and fourth mode buttons in the Vorpal Gamepad "F" (Fight) line.
  • When to use it: When you wish to move the robot in a way that is identical to the third and fourth gamepad "F" mode buttons.
  • Options and Menus:
    • Fight Style: This is the pulldown menu on the block. The styles correspond to the movements that can be executed using the F3 and F4 gamepad buttons with DPAD buttons. The styles are:
      • square up: returns the robot to a normal standing position
      • thrust forward: thrusts body forward by moving hips
      • thrust backward: thrusts body backward by moving hips
      • lean left: moves legs to lower left side of the body towards the ground
      • lean right: moves legs to lower right side of the body towards the ground
      • lean forward: moves legs to lower front of the body towards the ground
      • lean back upward: moves legs to lower back of the body towards the ground while raising the front of the body up higher into the air
      • twist hips right: twists hips to the right without changing the position of the knees
      • twist hips left: twists hips to the left without changing the position of the knees
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: The movements that can be executed using this block are useful for picking up an object, such as in Capture the Flag. Also these movements are additive to the prior positions of the robot's servos. In other words, if you were to create a custom leg position using the POSE block, then were to execute a twist hips left action using this block, the twisting action will take place relative to the prior position of the servos, adding to them.

Beep

Fight Adjust Block
  • What it does: Make the robot beep.
  • When to use it: Making sounds can be a good way to debug programs or spice up a dance routine. For example: you could make the robot beep in higher or lower tones depending on a sensor reading, giving you immediate feedback on how the sensor is working.
  • Options and Menus:
    • Frequency: The frequency of the beep, in Hertz. Higher numbers are shriller tones. The number should be between 30 and 2000; numbers out of this range will be clipped to the range.
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: None.

Record Start and Record End

Record Start mode button options
Record Start dpad button options
Record End
  • What it does: This block allows you to store a new move onto one of the buttons on the gamepad. You can run multiple programs to store different leg motions on different button sequences. You can store up to 72 custom leg motions (one for every combination of W, D, F mode buttons times the seven DPAD button combinations, six actual buttons and also "nothing pressed"). These new leg motions might be able to give you advantages during activities like Joust, Capture-the-Flag, the Fidget Spinner Challenge, Obstacle Course, etc. After storing a new leg motion on a button combination, you can invoke your custom leg motions by doing a "long click" on a mode button followed by pressing the DPAD button on which you stored your new custom motion.
  • When to use it: When you want to be able to use a move you have created in Scratch without being connected to the Internet or having Scratch open. After storing your new leg motion, you can actually disconnect the gamepad from the USB cord and call up your new motion using a long click on a mode button of your choice.
    • First, create a sequence of moves you would like to store using any Vorpal Scratch blocks of your choice.
    • Next, place the Record Start block at the beginning of this sequence. Fill in the options and menus as described below. This allows you to select the button combination that will trigger your new motion.
    • Place the Record End block at the end of the sequence you would like to store. The Record End block has no options or menus.
    • Run your program (at least) once. You should see the robot actually execute the motions you programmed, this will help you confirmed the motion does what you want it to do.
    • That's it! You now have a brand new move stored on the gamepad! A long-click on the mode button you chose in the RECORD START block will cause the DPAD button you selected to execute your new leg motion.
  • Options and Menus on the RECORD START block:
    • Mode button: This is the first pulldown menu on the block. It selects the mode that your new recorded move will be stored in. The options are the top twelve mode buttons:
      • Walk 1: stores your recording in mode W1
      • Walk 2: stores your recording in mode W2
      • Walk 3: stores your recording in mode W3
      • Walk 4: stores your recording in mode W4
      • Dance 1: stores your recording in mode D1
      • Dance 2: stores your recording in mode D2
      • Dance 3: stores your recording in mode D3
      • Dance 4: stores your recording in mode D4
      • Fight 1: stores your recording in mode F1
      • Fight 2: stores your recording in mode F2
      • Fight 3: stores your recording in mode F3
      • Fight 4: stores your recording in mode F4
    • DPAD button: This is the second pulldown menu on the block. It selects the DPAD button that your new recorded move will be stored on. The options are:
      • nothing pressed: Your recording will execute when you are in the mode that you selected from the Mode button pulldown menu and you are not pressing any DPAD buttons. This could, for example, allow you to make a new "resting stance" for your robot that is different than the normal "stand" pose for the mode you've selected.
      • forward: Your recording will execute when you are in the mode that you selected from the Mode button pulldown menu and you are pressing the forward DPAD button (the one at the top of the diamond that the four centered DPAD buttons make).
      • backward: Your recording will execute when you are in the mode that you selected from the Mode button pulldown menu and you are pressing the bottom DPAD button.
      • left: Your recording will execute when you are in the mode that you selected from the Mode button pulldown menu and you are pressing the left DPAD button.
      • right: Your recording will execute when you are in the mode that you selected from the Mode button pulldown menu and you are pressing the right DPAD button.
      • special: Your recording will execute when you are in the mode that you selected from the Mode button pulldown menu and you are pressing the very top DPAD button (the one that is separate and above the diamond of the other 4 DPAD buttons).
  • Other Notes:
    • To access your new leg movement:
      • Click the mode button you stored it in for 0.5 seconds or more. When you first press the mode button you'll hear a tone. Then, if you keep holding it for 0.5 seconds or more you'll hear a second higher pitched tone to indicate you are now in long click mode and your Scratch recording will be executed when a DPAD button is selected.
      • Press the DPAD button you stored it on. If you press a DPAD button on which no recording was saved, then the default action will be executed as usual.
    • To return to the default action performed by the button:
      • Click the mode button for less than 0.5 seconds. You'll hear an initial tone to confirm you pressed a mode button but no second high pitched tone.
  • It's important to realize that what's happening here is the gamepad is simply playing back the results of your Scratch program. So, Scratch programs that use sensor values to modify robot actions won't work as expected when replayed: whatever sensor reading actually occurred when you made your recording will govern how the legs move. Think of it this way: you're not storing the actual Scratch program on the gamepad, you're just storing the leg motions that your Scratch program caused to happen when it ran.

Erase Recordings

Record Start
  • What it does: This block erases all recordings on the SD card. This includes all long-click Scratch recordings as well as any recording made by the RECORD function on the gamepad.
  • When to use it: When you want to make sure there are no recordings left over from prior experiments. This is more convenient to use than taking the SD card out and using an SD card reader on your PC to erase files.
  • Options:

There are no options on this block.

  • Other Notes:

This block is normally not used inside of a program, but rather is executed by itself outside of any program on an occasional basis. This block may require a second or two to execute on the gamepad, so if for some reason you do decide to place it in a program then it is recommended that you put a wait block after it, and wait for at least two seconds.

Sensor

Sensor options
  • What it does: This block stores the values of sensors you use on your Vorpal
  • When to use it: When you wish to obtain readings from a sensor and use them in your program
  • Options and Menus:
    • Sensor Options: This is the pulldown menu on the block. You can choose from the following sensors:
      • Ultrasonic distance: stores the values obtained by the ultrasonic distance sensor
      • Analog 3: stores the values of any sensor plugged into analog port 3
      • Analog 6: stores the values of any sensor plugged into analog port 6
      • Analog 8: stores the values of any sensor plugged into analog port 8
  • Other Notes: This block is meant to be used with logic, for example an if statement. It is called a "reporter," not an "action block." It is shaped differently than the other blocks in the Vorpal extension because of this. When you are using Scratch, this block can be inserted anywhere that has the same oval shape. This will always be within a space on another block, not, for example, on its own between a Walk block and a Fight block. The Sensor block does not have the puzzle piece indents in its top and bottom that are found on the action blocks in the Vorpal extension, so you are not able to click the Sensor block into place between the Walk block and the Fight block.

Set Legs

Set Legs
  • What it does: This block allows you to arbitrarily choose the positioning of each knee and hip on combinations of legs on your Vorpal Hexapod in a single operation. There are options to allow you to conveniently apply the leg setting to groups of legs that are frequently moved together, or you can choose an individual leg.
  • When to use it: When you wish to create a movement that is distinctly different from those that you can trigger using the gamepad
  • Options and Menus:
    • Leg Selection: This is the first pulldown menu on the block. It is used to choose which leg(s) will move in response to the Set Legs block. The options are:
      • all: selects all six legs
      • left: selects the three legs on the left side (legs 3, 4, and 5)
      • right: selects the three legs on the right side (legs 0, 1, and 2)
      • front: selects the two front legs (legs 0 and 5)
      • middle: selects the two middle legs (legs 1 and 4)
      • back: selects the two back legs (legs 2 and 3)
      • tripod1: selects legs 0, 2, and 4
      • tripod2: selects legs 1, 3, and 5
      • 0: selects leg 0
      • 1: selects leg 1
      • 2: selects leg 2
      • 3: selects leg 3
      • 4: selects leg 4
      • 5: selects leg 5
    • Hips: This is the first number you can enter on the block, and it sets the angle of the hip servos on the selected legs. It will position the hip servos of the leg(s) you selected. You can enter any number from 10 to 170 degrees. When looking at the robot from above, 10 degrees is all the way clockwise, and 170 degrees is all the way counter-clockwise. This range is smaller than 0 to 180 degrees because the leg positioning restricts the hips from being able to move in a full semicircle. Note: this will change if you select the mirror hips option - see Hip Style below.
    • Knees: This is the second number you can select on the block, and it sets the angle of the knees for the selected legs. It will position the knee servos of the leg(s) you selected. You can enter any number from 0 to 180 degrees. 0 degrees moves the knees all the way down (so Vorpal is standing up on "tippy toes"). 30 degrees is a normal standing stance. 90 degrees makes Vorpal sit on the floor. 180 degrees puts the legs all the way up in the air.
    • Options: This is the second pulldown menu on the block. It alters the way the Hip Degrees entry moves the hips. The options are:
      • mirror hips: makes the left side hips (3, 4, and 5) move in the opposite way as is described in the Hip Degrees section. For legs 0, 1, and 2, when looking at the robot from above, 10 degrees is all the way clockwise, and 170 degrees is all the way counter-clockwise. For legs 3, 4, and 5, when looking at the robot from above, 10 degrees is all the way counter-clockwise, and 170 degrees is all the way clockwise. This is useful for walking type actions, where you want the left and right sides of the robot to move symmetrically.
      • raw hips: makes all the hips be controlled as described in the Hip Degrees section. When looking at the robot from above, 0 degrees is all the way clockwise, and 180 degrees is all the way counter-clockwise.
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: If you attempt to set leg positions such that the legs would crash into each other, the software will modify your request so that the legs don't significantly push against each other. The most they will do is slightly press together.

Set Hips

Set Legs
  • What it does: This block allows you to arbitrarily choose the positioning of each hip on each leg of your Vorpal.
  • When to use it: When you wish to create a hip movement that is distinctly different from those that you can trigger using the gamepad
  • Options and Menus:
    • Hip Selection: This is the first pulldown menu on the block. It is used to choose which hip(s) will move in response to the Set Hips block. The options are:
      • all: selects all six hips
      • left: selects the three hips on the left side (hips 3, 4, and 5)
      • right: selects the three hips on the right side (hips 0, 1, and 2)
      • front: selects the two front hips (hips 0 and 5)
      • middle: selects the two middle hips (hips 1 and 4)
      • back: selects the two back hips (hips 2 and 3)
      • tripod1: selects hips 0, 2, and 4
      • tripod2: selects hips 1, 3, and 5
      • 0: selects hip 0
      • 1: selects hip 1
      • 2: selects hip 2
      • 3: selects hip 3
      • 4: selects hip 4
      • 5: selects hip 5
    • Position: This is the first number you can enter on the block. It will position the hip servos of the hip(s) you selected. You can enter any number from 10 to 170 degrees. When looking at the robot from above, 10 degrees is all the way clockwise, and 170 degrees is all the way counter-clockwise. This range is smaller than 0 to 180 degrees because the leg positioning restricts the hips from being able to move in a full semicircle. Note: this will change if you select the mirror hips option - see Hip Style below.
    • options: This is the second pulldown menu on the block. It alters the way the Hip Degrees entry moves the hips. The options are:
      • mirror hips: makes the left side hips (3, 4, and 5) move in the opposite way as is described in the Hip Degrees section. For legs 0, 1, and 2, when looking at the robot from above, 10 degrees is all the way clockwise, and 170 degrees is all the way counter-clockwise. For legs 3, 4, and 5, when looking at the robot from above, 10 degrees is all the way counter-clockwise, and 170 degrees is all the way clockwise. This is useful for walking type actions, where you want the left and right sides of the robot to move symmetrically.
      • raw hips: makes all the hips be controlled as described in the Hip Degrees section. When looking at the robot from above, 0 degrees is all the way clockwise, and 180 degrees is all the way counter-clockwise.
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: If you attempt to set leg positions such that the legs would crash into each other, the software will modify your request so that the legs don't significantly push against each other. The most they will do is slightly press together.

Set Knees

Set Legs
  • What it does: This block allows you to arbitrarily choose the positioning of each knee on each leg of your Vorpal.
  • When to use it: When you wish to create a knee movement that is distinctly different from those that you can trigger using the gamepad
  • Options and Menus:
    • Hip Selection: This is the first pulldown menu on the block. It is used to choose which knee(s) will move in response to the Set Knees block. The options are:
      • all: selects all six knees
      • left: selects the three knees on the left side (knees 3, 4, and 5)
      • right: selects the three knees on the right side (knees 0, 1, and 2)
      • front: selects the two front knees (knees 0 and 5)
      • middle: selects the two middle knees (knees 1 and 4)
      • back: selects the two back knees (knees 2 and 3)
      • tripod1: selects knees 0, 2, and 4
      • tripod2: selects knees 1, 3, and 5
      • 0: selects knee 0
      • 1: selects knee 1
      • 2: selects knee 2
      • 3: selects knee 3
      • 4: selects knee 4
      • 5: selects knee 5
    • Position: This is the second number you can select on the block. It will position the knee servos of the knee(s) you selected. You can enter any number from 0 to 180 degrees. 0 degrees moves the knees all the way down (so Vorpal is standing up on "tippy toes"). 30 degrees is a normal standing stance. 90 degrees makes Vorpal sit on the floor. 180 degrees puts the legs all the way up in the air.
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: If you attempt to set leg positions such that the legs would crash into each other, the software will modify your request so that the legs don't significantly push against each other. The most they will do is slightly press together.

Stand

Set Legs
  • What it does: This block returns Vorpal to one of two standing positions.
  • When to use it: When you wish to stop the robot's motion and have it stand still.
  • Options and Menus:
    • Standing Style: This is the pulldown menu on the block. It allows you to select which standing style you want Vorpal to do. The styles are:
      • normal: stands Vorpal up
      • tiptoes: stands Vorpal up on tiptoes (like in Dance ballet mode)
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: When standing in a normal stand position the servos will automatically go to sleep after about 6 seconds of inactivity, this saves power. On most surfaces the robot will continue standing normally with servos asleep.

Pose

Pose
  • What it does: This block allows you to set all 12 leg servos in a single command.
  • When to use it: When you want to "pose" the robot in one single convenient command. Although you do need to set all 12 position numbers. This is best for poses that are not symmetrical or hard to implement using the SET LEG, SET KNEE, or SET HIP commands. Also, it's good for creating a new "stand still" type pose for the robot when programming "nothing pressed" custom Scratch motions using the RECORD START block.
  • Options and Menus:
    • H0, H1, H2, H3, H4, H5 These options allow you to set hip positions for hips numbered 0 through 5 (as marked on the robot). The numbers are the same as what you could use in the SET HIPS block.
    • K6, K7, K8, K9, K10, K11 These options allow you to set knee positions for knees numbered 6 through 11 (as marked on the robot's legs). The numbers are the same as what you could use in the SET KNEES block.
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: Poses that crash legs together will be automatically modified such that legs don't ever do more than lightly touch.

Set Servo

Set Servo
  • What it does: This block allows you to set one single servo on the servo controller. It allows you to reach all 16 servo ports on the servo controller, not just the 12 servos used for legs.
  • When to use it: Although you can use this command to control leg servos, the primary purpose of this command is to gain control over the 4 servo ports that go beyond the leg servos. You could, for example, create a gripper attachment, use servo port 12, 13, 14, or 15 to control it and give it power, then use this block to open and close the gripper. You could also attach a sensor or camera to the robot and use a small servo to move it back and forth in a sweeping motion using this block.
  • Options and Menus:
    • port The servo port number for the servo you wish to control, a number between 0 and 15 inclusive.
    • Operation This menu lets you set how the servo should position should be modified. It can take these values:
      • = The servo is set equal to the position value.
      • + The position value is added to the current servo position.
      • - The position value is subtracted from the current servo position.
    • Position This is an integer value specifying the position number (an angle or change in angle depending on the Operation chosen). It should be between 0 and 180 inclusive. If you pick a number out of this range the number will be clipped to the range.
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: There is no crash detection for servos 12 through 15 since the code doesn't know how you might configure any attachments!

Gait

Set Legs
  • What it does: This block allows you to execute a customized version of a tripod gait or other gaits. A "gait" is a style of walking. For example, you could modify the normal W1 gait to lift the legs higher, move faster, swing the hips more or less than normal, or lean the robot forward or backward while walking. You can also access a "ripple gait" which is normally not programmed into any gamepad button.
  • When to use it: When you want to walk in a way not normally accessible from the gamepad, but don't want to have to program each individual leg motion. You can create modified versions of standard gaits with a single simple command. So imagine creating a "belly crawl" gait to get under an obstacle, or imagine leaning the robot back so your lance is higher up in a Joust match. You can do those things very easily with this command.
  • Options and Menus:
    • Gait Style: This is the pulldown menu on the block. It allows you to select which gait style you want Vorpal to do. The styles are:
      • tripod: In this gait, groups of 3 legs move in unison. This is the type of walking that the W line of mode buttons normally trigger.
      • turn in place: This is a tripod turning gait.
      • ripple: This gait is not programmed onto any default gamepad button. In this gait, only one leg moves at a time. Many insects use types of ripple gait to move. It is a very stable (but somewhat slow) way of walking, good for situations where there is not much traction or loose debris is in the way.
    • Direction: This is the second pulldown menu, and it selects what direction the gait should move: forward or backward. For turn in place gait, forward is clockwise looking from the top, backward is counterclockwise.
    • hipsfwd, hipsbw: These parameters let you specify the angle used when moving hips forward and backward. See the SET HIPS command for a description of what the position numbers mean.
    • kneesup, kneesdown: These parameters let you specify the angle used when moving knees up and down. See the SET KNEES command for a description of what the position numbers mean.
    • lean: This parameter makes the robot lean forward or backward while walking. It only works currently in tripod gaits. A positive number leans the robot such that the accessory port would be higher up; a negative number leans such that the accessory port is lower down. This can be extremely useful in games like Joust or Capture-The-Flag when making custom Scratch leg motion recordings. The maximum angle you can specify is 60 degrees, the minimum is -60 degrees, but in practice you should probably keep this in the range of plus or minus 45 degrees.
    • Cycle time: This is the amount in time, in seconds, that one complete cycle of the gait should take. The smaller you make this number, the faster the robot will move. However, if you make this number so small that the servos can't physically complete their motion, then you'll end up with a big jumble of motions that don't work. For ripple gaits this needs to be a larger number than for tripod gaits, and the farther you move the servos the longer this time needs to be.
    • Seconds: This is the number of seconds to execute this block before moving on to the next block. It is recommended that this value be no lower than 0.15 seconds, since the radio protocol only transmits actions once every 0.1 seconds and servo motors cannot respond any faster than that anyway.
  • Other Notes: When standing in a normal stand position the servos will automatically go to sleep after about 6 seconds of inactivity; this saves power. On most surfaces the robot will continue standing normally with servos asleep.

Future Blocks in Progress

These blocks are not yet ready to use.

cmucam5

NOTE: This button is experimental and not yet supported. Please follow us on the Vorpal Forum to see an announcement when this is officially released.

  • What it does: This block stores the values from a cmucam5
  • When to use it: When you wish to obtain readings from a cmucam5 and use them in your program
  • Options and Menus:
    • Property Options: This is the pulldown menu on the block. You can choose from the following properties of the largest object seen by the cmucam5:
      • x: stores the x coordinate of the largest object identified in the field of view of the camera
      • y: stores the y coordinate of the largest object identified in the field of view of the camera
      • width: stores the width of the largest object identified in the field of view of the camera
      • height: stores the height of the largest object identified in the field of view of the camera
      • object id: stores the object id of the largest object identified in the field of view of the camera
  • Other Notes: This block is meant to be used with logic, for example an if statement. It is called a "reporter," not an "action block." It is shaped differently than the other blocks in the Vorpal extension because of this. When you are using Scratch, this block can be inserted anywhere that has the same oval shape. This will always be within a space on another block, not, for example, on its own between a Walk block and a Fight block. The cmucam5 block does not have the puzzle piece indents in its top and bottom that are found on the action blocks in the Vorpal extension, so you are not able to click the Sensor block into place between the Walk block and the Fight block.

Vorpal The Hexapod Quick Links

Sign Up For Our NEWSLETTER VORPAL FORUM: Join the Discussion

User Documentation:

Getting & Giving Vorpal

Activities:

Contact/Press: