Vorpal Hexapod Quick Links:
- 1 Introduction
- 2 General Care of the Gamepad
- 3 Gamepad Button Layout and Terminology
- 4 The General Idea
- 5 Overview of Movement Modes
- 6 Long Click
- 7 Record/Play
- 8 Special Gamepad Boot Functions
This article is the user guide for the Vorpal Gamepad with V3 software installed. For instructions on the robot, see Vorpal The Hexapod User Guide.
The V3 software was released on July 15, 2020 and installed on all our kits after that date. Before that date, our releases included V2 software. The user guide for V2 is here: Vorpal The Hexapod Gamepad User Guide, V2. You can upgrade to V3 by following the instructions here: Vorpal The Hexapod: Flashing The Arduino Code.
The Vorpal Hexapod Gamepad has many features to let you control your hexapod, including:
- A range of 10 to 15 meters (30 to 50 feet) if batteries are fully charged.
- Select one of twenty-four (24) different pre-programmed movement modes, which then modify the functions on the five D-PAD buttons, for a total of 120 built-in leg motions.
- Record and later play back a sequence of hexapod motions.
- Tether the gamepad to a computer using a USB cord, then use the MIT Scratch system to control the hexapod using a program you write.
- Upload Scratch-programmed leg motions onto the gamepad, then use them as new movement modes of your own design by long-clicking on mode buttons.
- Adjust the servo motor positions using Trim Mode
- Reformat the SD Card installed in the gamepad (typically needed only if the SD Card gets corrupted or you wish to simply erase everything on it).
- Auto-detect the output style of the D-PAD button module (typically needed only once after building the gamepad).
Although it seems like a lot to take in, everything is organized in major groups of functions and we have found that even small children can be successfully controlling the hexapod in under a minute, with very little explanation. After practicing for just a short time, you will be flipping through different modes and controlling the hexapod like a pro!
This article will explain all of these functions one by one and step by step, but for most functions it's also perfectly reasonable (and fun) to just pick up the controller and experiment to learn what each button does, once you learn the basic concept!
General Care of the Gamepad
- Never allow the gamepad to get wet or be exposed to excessive dust or other environmental hazards.
- Do not drop or throw the gamepad, it contains sensitive electronics.
- Always remove the batteries after use. Leaving the battery in the gamepad risks that the gamepad is accidentally turned on and left to drain the batteries to the point where they are damaged.
- Make sure you're using fresh batteries at the start of each session. Running the gamepad on very weak batteries might cause the internal settings to be lost (which can be recovered by simply rebooting with fresh batteries while holding down the D-PAD "special" key).
Gamepad Button Layout and Terminology
As you can see in the diagram, there are two groups of buttons on the gamepad:
- On the left are four rows of four buttons, and we'll call this group of buttons "the mode buttons".
- These buttons are used to select a movement mode or activate the record/play feature.
- The rows are labelled "W", "D", "F", and "R", (Walk, Dance, Fun*, Record) and the columns are number 1, 2, 3, 4.
- In this guide, we'll refer to a button such as W1, meaning the button located in row W column 1, or D4, meaning row D column 4, etc.
- A mode button may be either single-clicked, double-clicked, or long-clicked. Long clicking is used to access saved Scratch motions and we'll talk about that later. Single and double clicks will access preprogrammed leg motions. We will denote, for example, a single-click as W1 while the same button double clicked would be denoted W1W1.
- A single-click is simply one short tap on a given button. The robot will emit a moderate pitched chirp to confirm the click registered.
- A double-click is two rapid clicks on the same mode button. The two clicks have to fall within half a second of each other. The robot will emit a moderate pitch chirp on the first click and a high pitch chirp on the second click.
- A long-click is activated by holding down a mode button for about one second continuously. The robot will emit a moderate pitch chirp when you first press the button, then after about one second a very high pitch chirp to confirm that a long click has registered.
- Below the mode buttons are symbols used to remind you of record/play functions. These will be described in more detail later in the section Record/Play.
- On the right are five yellow buttons. This is called the D-PAD (directional button pad).
- There are four D-PAD (directional pad) buttons arrange in a diamond shape, and they correspond to directions (top of diamond is forward, bottom backward, left and right as you would expect). When we say "forward" we mean the top button, "backward" the bottom button, etc.
- The fifth D-PAD button all the way at the top by itself activates special functions and will be called "special".
--- *NOTE: "Fun" mode used to be called "Fight" mode in V2. We changed it because most of the motions now don't have anything to do with fighting, it's more of a catch-all of interesting motions that can be used for many different kinds of games and activities.
The General Idea
Everything works consistently making it easy to learn. All you do is:
- Select a movement mode by clicking or double clicking one of the mode buttons on the left.
- Then press and hold down one of the D-PAD buttons to move in different ways.
As a simple example, to access a normal walking mode, just press W1. After that, the D-PAD buttons will move the hexapod left, right, forward, or backward. The special button will cause the hexapod to "stomp" in place without moving and "honk" the buzzer. It's that simple.
Each row of mode buttons groups together similar functions. These will be explained in the next section.
Just remember this general point: you "press and release" a mode button, then you "press and hold" one D-PAD button at a time.
Depending on which mode button you clicked, the D-PAD buttons will do different things.
Overview of Movement Modes
The top three rows of mode buttons are marked "W", "D", and "F". These will be explained in this section. They are the main modes used for different competitions, or just to drive the hexapod around and make it do tricks. The fourth row, "R" will be explained under the section Record/Play.
The letters marking each row stand for:
- W: Walk. These are modes designed to get you from one place to another in different ways.
- D: Dance. These modes make the hexapod perform for you! They can be used just for fun, or for dance competitions. However, if you are clever you will find they can also be useful in other kinds of competition besides dance. For example, "ballet" dancing mode can sometimes be very useful during "Joust" games, since they allow you to stand up on tip-toes.
- F: Fun. These "fun" modes can be used effectively in many kinds of competitions. Some of them allow the front two legs to move in various ways, and some allow the entire hexapod to lean, tilt, and rotate in different ways.
The diagram to the right is a grid that corresponds to the mode button layout, with words describing each mode. The following sections will give more details.
Walk Modes, Single Click
The four single click walk modes are accessed by selecting a mode from the "W" row. You'll be using these a lot, that's why they're on the top row. These are also easy to understand, because the D-PAD is used exactly the same way for all four, and are very intuitive. As you can see in the diagram to the right, the walk mode D-PAD "forward" button walks forward, "backward" walks backward, etc. What could be easier than that? The special D-Pad button does a "stomp" in place and also beeps the buzzer as if you're honking a horn.
The fours single click walk modes are:
- W1: Low step. You can think of this as "normal" walking. It's a good general purpose walk. Because the legs are not lifted up very high, it's good for level ground without obstacles. Also, because the legs don't need much time to move up and down, it's pretty fast.
- W2: High step. This walk lifts the knees up high, and is useful for getting over obstacles. However, because it takes longer to move the knees farther, it is slower than low step mode.
- W3: Small step. This walk moves the hips very little, allowing you to move in tiny steps. This can be very useful if you want to slightly change your position, for example to adjust the hexapod for Capture the Flag or other competitions.
- W4: Scamper. In this walk, the legs move as quickly as possible. They move so quickly that you will have trouble moving in a controlled fashion. This is also a much less stable walk mode because one leg motion doesn't even finish before the next one starts! But if you need to get somewhere quickly and you're not too concerned about stability or accuracy, scamper mode is the right choice!
Walk Modes, Double Click
The four double click walk modes are accessed by selecting a mode from the "W" row, but you'll click each button twice. For example, instead of just clicking W1, you'll click W1 W1 in quick succession. (About half a second).
The fours double click walk modes are:
- W1W1: Ripple Gait. Ripple gait moves exactly one leg at a time. It allows the most stable form of walking since five of the six legs are on the ground at once. However, it's very slow.
- W2W2: Belly Crawl. This walk might be used to get under low overhangs. The robot stays down on it's "belly" and just raises up slightly.
- W3W3: Quadruped Gait. This walk only uses four of the six legs, and keeps the middle legs up in the air, using them for balance.
- W4W4: Sidestep Gait. In this gait, the robot never "turns". It moves in different directions by redefining where the front of the robot is. The forward and backward buttons work as usual. However, the left D-PAD button will redefine the front of the robot to be between legs 0 and 1, and the right D-PAD button will define the front of the robot as being between legs 4 and 5. The "special" D-PAD button will further redefine the left and right D-PAD buttons as making the front of the robot between legs 1 and 2 or 3 and 4, respectively, and reversing the meaning of back and front. In other words, the special button pretends the front of the robot is the back and the back is the front. Clicking it a second time brings things back to normal. This mode of walking allows something similar to a sidestep or strafing motion, however instead of a true sidestep (which would be movement at a 90 degree angle to the front of the robot) the angles are 60 degrees instead. I know this all sounds kind of confusing--it's easier to just try it out, you'll see how it works very quickly!
NOTE: As with single-click walk modes, the D-PAD chooses the direction of walking and the "special" D-PAD button stomps and honks. The only exception is Sidestep mode (W4W4) where the "special" button toggles whether the front or back of the robot is used to reference other motions.
Dance Modes, Single Click
- D1: Freestyle. This dance mode allows several twisting motions: standing twist, sitting on the ground, some legs in the air, etc. The diagram to the right shows the names of each Freestyle dance mode.
- D2: Ballet. In ballet mode, the hexapod goes up on its tip-toes like a ballerina "on pointe". The D-PAD buttons have their usual walking mode meanings, forward, backward, left, right, and in-place. You won't move quickly in this mode, it's about grace and style, not speed!
- D3: Wave. The wave dance mode executes several different "waving" motions where the entire hexapod body sways back and forth, or in some cases ripples each leg in turn.
- D4: Hands. The hands dance modes leave four legs on the ground and use the other two legs as if they are arms coming off the sides. These "arms" can be made to sway back and forth or forward and backward by using the D-PAD.
Dance Modes, Double Click
- D1D1: Twitch. All the legs are aligned along the sides of the robot, and several different rhythmic twitching motions are triggered by the D-PAD.
- D2D2: Sway. Similar to twitch mode, but the entire body of the robot sways from side to side.
- D3D3: Star. The robot rhythmically moves the legs in several different star-like patterns.
- D4D4: Random. Different D-PAD buttons move different sets of legs using a crazy looking random brownian motion.
Fun Modes, Single Click
Each fun mode has a unique D-PAD configuration, but with a little practice you'll know them all. The diagram below shows how the D-PAD is used in each of the four fun modes.
- F1: Front Legs Fight. This mode puts the back four legs in a stable position and lifts the front two legs off the ground. D-PAD functions allow these front legs to execute sweeping and jabbing punch-like motions. The Auto Ninja mode executes a series of preprogrammed moves designed to dazzle the opponent. The special D-PAD button triggers "auto Ninja" mode in which a complex sequence of pre-programmed, rapid motions take place.
- F2: Front Leg Unison Fight. This mode is like Front Leg Fight Mode but both legs move together, allowing more power behind the punches. Like the F1 fun mode, the special D-PAD button executes an auto-Ninja function.
- NOTE: If the grip arm is installed, turning the robot's potentiometer dial slightly counterclockwise from RC mode will cause F2 to control the grip arm. You may also use this with your own project extensions to the robot that use additional servos on servo controller ports 12 and/or 13.
- If the robot is in grip arm control mode, the D-PAD buttons will move the grip arm up (f), down (b), open the claw (l), close the claw (r), or reset the grip arm to a neutral position (s).
- F3: Swivel and Thrust. This mode uses the D-PAD functions to swivel the hips clockwise and counter-clockwise, or thrust the hexapod's body forward and backward using the hips. It can be very useful for Capture the Flag and Joust type competitions. The special D-PAD button returns the hexapod to a standing position.
- F4: Lean. In this mode, the entire body leans forward, backward, left or right. The special D-PAD button returns the hexapod to a standing position.
Fun Modes, Double Click
- F1F1: Dog Beg Mode. This mode makes the robot stand with its front legs in the air, and different D-PAD buttons will cause the front two legs to wave, "beg", and make other motions.
- F2F2: Right Front Leg Control. This mode allows you to move leg number 5 (the right front leg) up, down, left, and right. The "special" D-PAD button resets all legs to normal standing position.
- F3F3: Left Front Leg Control. Similar to F2F2 but controls leg 0.
- F4F4: Rise and Fall Causes the robot to rise up on all legs, lower down on all legs, or do twisting up and down motions. The "special" D-PAD button resets to normal standing position.
In addition to single and double clicks, the mode buttons may also be long-clicked. This means you press and hold the button for about 1 full second. You'll hear a moderate tone when you first start to hold the mode button, then a high pitched squeal when the long click is confirmed.
A long click will execute any Scratch function you have previously stored on the gamepad for that mode. See: Vorpal Scratch Reference, Record Start
The bottom row of buttons, next to the R label, allow you to record, replay, and erase a set of motions. The gamepad also shows standard symbols for record/play functions (similar to DVR or DVD player controls). Recordings are stored on the SD card in the gamepad. If you do not have an SD card inserted, you cannot record and a low pitched error tone will come out of Vorpal if you try.
R1 (Record/Stop) has two functions. If you're not recording, it starts recording. If you are recording, it stops the recording. Similarly, R2 (Play/Pause) has two functions. If you are not playing a recording, this button causes the recording to start playing at the current position. If you are playing, this button causes the play to stop.
Recording a Session
To make a recording, follow these steps:
- Tap on R1 (Record/Stop).
- Use other buttons to do any set of motions you want.
- You will hear a very short chirping sound about every 4 seconds to remind you that you are recording.
- The recording can be quite long, depending on the size of your SD card, it could last for hours if desired! But usually you'll be recording short sequences that last only seconds or minutes.
NOTE: If you record a sequence, then record again without using rewind or erase first, the new sequence will be added to the end of the current recording. In this way you can build up a longer sequence of motions a few steps at a time.
- When you have recorded what you want, press R1 (Record/Stop) again.
Playing back a recording
To play back your current recording, follow these steps:
- Press R2 (Play/Pause)
- Your recording will replay from the beginning.
- There will be a short chirp at the end of the play to indicate is is completed.
- Pressing R2 while the recording is playing will pause the recording. Pressing it a third time will pick up where it left off. You may also press R3 (rewind) while paused to start over at the beginning.
To rewind the recording the start:
- Press R3 (Rewind).
- This is typically only useful if you paused a playback and want to start over from the beginning.
Erasing the recording
To erase the current recording:
- Press R4 (Erase) and hold it for four seconds.
- When you first press it, you will hear a brief squeal.
- After holding it for four seconds, you'll hear a longer squeal. This second, long squeal indicates the recording has been erased successfully.
Trouble shooting record/play mode
Recordings don't work at all
- Make sure you have an SD card properly inserted. After inserting, power off the gamepad and power it back on to make sure the SD is recognized by the system.
- If you have an SD card inserted but the record function still does not appear to work, it is possible your SD card is corrupted. You would need to insert it into a computer that has an SD card socket (or obtain a USB SD card reader, they are cheap) and use your computer to check the SD card for errors, or use your computer's FORMAT command to format the card. This will usually fix any errors.
My Robot is Driving Itself!
When you hand the gamepad over to someone who has never used it before, it's not uncommon for them to just start pressing buttons to see what they do. Invariably, someone will get into record mode by accident and record a long sequence. They may later stop the recording mode, then randomly hit the play button. They will then get really confused because it will seem like the robot has a mind of its own! It will just keep moving (playing the prior recording!) without the user pushing any buttons. If this happens, simply press R2 (Play/Pause) and then erase the accidental recording using R4 (hold for 4 seconds).
Special Gamepad Boot Functions
There are several special functions that you can access by holding down a particular button while turning on the gamepad. This section describes these special functions. They are generally things that you rarely need to use, but they're good to have when you need them!
Hexapod Leg Trim Mode
The gamepad can also be used to make fine adjustments to the servo positions so they are perfectly aligned (within a fraction of a degree). This is important, as it ensures all the servos are equally bearing the weight of the robot, and makes the robot walk straighter and generally perform better.
This is a specialized function that you only need to do once after building the robot (or again after swapping a motor), so it is describe in a separate wiki page: Vorpal The Hexapod Trim Mode Guide.
Format SD Card Function
The gamepad can format the SD card that's in the SD card slot. This is useful because Arduino's SD library requires the card be formatted a certain way and most operating systems won't use the right method for small sized cards.
The SD card can sometimes become corrupted which will require it to be reformatted, or you may obtain a new SD card in the future and it's best to let the gamepad itself format it. If the SD card is missing or corrupted, attempting to record (R1) or play (R2) will result in a low pitch error buzz.
To avoid corrupting the SD card, follow these practices:
- Never remove or insert the SD card when the gamepad is turned on. Always turn the gamepad off before inserting or removing the SD card.
- Never shut off the gamepad when it is in record mode, as data may be partially saved to the SD card while recording, and sudden loss of power can corrupt the SD card. While recording, the robot will chirp once ever few seconds. To stop recording, press R2 (Play/Pause) or hold R4 (Delete) for several seconds until you hear a high pitch squeal.
Please note: formatting the SD card will erase all recordings, Scratch recordings, etc.
To format the SD card follow these steps:
- Turn the gamepad off.
- Hold down the DELETE key (R4). Keep holding it.
- Turn the gamepad on.
- Count to 10 slowly, then release the DELETE key.
- Reboot the gamepad (turn it off then back on).
Auto-Detect D-PAD Button Type Function
Manufacturers of the D-PAD modules that we use in our project have two different output formats for the data that comes out of the D-PAD module. Unfortunately there is no way to tell by looking at the module which kind of output it provides.
If you find that your gamepad is not properly controlling the robot (i.e. the D-PAD button presses are not executing the correct functions) then you may want to have the Gamepad auto-detect the exact kind of D-PAD you have. You only need to do this once, because the result of the auto-detect is save in nonvolatile memory (EEPROM). (Note: booting the gamepad with very weak batteries may cause the settings to be lost, requiring you to run this procedure again. Therefore, always start a session with fresh batteries).
To force the Gamepad to detect and save the D-PAD style, follow these steps:
- Turn the gamepad off.
- Hold down the top button of the D-PAD module (Special). Keep holding it.
- Turn the gamepad on.
- Count to 10 slowly, then release the D-PAD Special button.
The Gamepad's D-PAD should work properly after following this sequence. Again, you typically only need to do this once after building the Gamepad. You may need to do it again perhaps after swapping to a new D-PAD module if you repair the Gamepad, or if you boot the gamepad with very weak batteries sometimes the EEPROM settings get corrupted. Swap to fresh batteries then use this function to reformat the EEPROM so it works again. Always use fresh batteries to avoid this issue!
Vorpal The Hexapod Quick Links
|Sign Up For Our NEWSLETTER||VORPAL FORUM: Join the Discussion|
Getting & Giving Vorpal