Vorpal Robotics Wiki
Log in

Vorpal Hexapod Scratch Block Reference

From Vorpal Robotics Wiki
Revision as of 13:59, 1 September 2017 by Vorpalwiki (talk | contribs) (Wait for Connection)

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:
  • When to use it:
  • Options and Menus:
  • Other Notes:

Fight With Arms

Fight with Arms
Fight arm style options
Fight with Arms movement options
  • What it does:
  • When to use it:
  • Options and Menus:
  • Other Notes:

Fight Adjust

Fight Adjust
Fight Styles
  • What it does:
  • When to use it:
  • Options and Menus:
  • Other Notes:

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: