Vorpal Robotics Wiki
Log in

Difference between revisions of "Vorpal Hexapod Scratch Block Reference"

From Vorpal Robotics Wiki
Line 76: Line 76:
 
* '''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.  
 
* '''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:'''  
 
* '''Options and Menus:'''  
** ''Arm Style:'' This is the first (leftmost) pulldown menu on the block. The walking styles correspond to the F1, and F2 gamepad buttons. The styles are:
+
** ''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.   
 
***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.   
 
***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 Style:''  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.
+
** ''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
+
***defend:
***lefthook
+
***lefthook: punch to the left
***righthook
+
***righthook: punch to the right
***uppercut
+
***uppercut: punch upwards
***downsweep
+
***downsweep: sweep arms downwards
***auto ninja
+
***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.
 
** ''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:'''
 
 
==Fight Adjust==
 
==Fight Adjust==
 
[[File:FightAdjust.PNG|right|350px|Fight Adjust]]
 
[[File:FightAdjust.PNG|right|350px|Fight Adjust]]
Line 94: Line 93:
 
* '''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.  
 
* '''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:'''  
 
* '''Options and Menus:'''  
* '''Other Notes:'''
+
** ''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
 +
***thrust forward
 +
***thrust backward
 +
***lean left
 +
***lean right
 +
***lean forward
 +
***lean back upward
 +
***twist hips right
 +
***twist hips left
 +
** ''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. 
  
 
==Record and Record End==
 
==Record and Record End==

Revision as of 01:56, 2 September 2017

NOTE: THIS PAGE IS UNDER CONSTRUCTION

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.


Wait for Connection

Wait for Connection
  • What it does: This block resets the serial port connecting Scratch to the Vorpal Gamepad and waits for a connection to be established. This process typically only takes one or two seconds, so you will see a slight delay when starting your program.
  • When to use it: The Wait for Connection block should be executed exactly one time and it should come before any other Vorpal Scratch Extension blocks in your program. Typically it is placed immediately after whatever action starts your program (such as clicking on the green flag). It is possible to write programs without using this block, but we've found the connection is much more reliable if you do use it, so we recommend placing this block at the beginning of every program.
  • 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, because that would cause undesirable delays and also could flush incoming sensor data that arrives while the connection is being reset.

Walk

Walk
Walk style options
Walk direction options
  • 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 or timing factors, use the TRIPOD 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, but if you want to get somewhere as quickly as possible 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
Dance Styles
  • 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:
      • wave totter:
      • wave ripple:
      • wave swirl left:
      • wave swirl right:
    • 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
Fight arm style options
Fight with Arms movement options
  • 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:
      • 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
Fight Styles
  • 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
      • thrust forward
      • thrust backward
      • lean left
      • lean right
      • lean forward
      • lean back upward
      • twist hips right
      • twist hips left
    • 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.

Record and Record End

Record Start
Record Start mode button options
Record Start dpad button options
Record End
  • What it does:
  • When to use it:
  • Options and Menus:
  • Other Notes:

Sensor

Sensor
Sensor options
  • What it does:
  • When to use it:
  • Options and Menus:
  • Other Notes:

Set Legs

Set Legs
Set Legs leg options
Set Legs hip options
  • What it does:
  • When to use it:
  • Options and Menus:
  • Other Notes:

Vorpal Hexapod Quick Links: