Wiki source code of The Complete Hexapod 2 Tutorial
Last modified by Eric Nantel on 2026/04/02 16:10
Show last authors
| 1 | {{html wiki="false" clean="false"}} |
| 2 | <style> |
| 3 | .asm { font-family: Verdana, Helvetica, sans-serif; font-size: 14px; max-width: 960px; } |
| 4 | .asm-step { background: #fff; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 1.5rem; overflow: hidden; } |
| 5 | .asm-step-header { background: #F5A800; display: flex; align-items: stretch; justify-content: space-between; } |
| 6 | .asm-step-name { padding: 0.6rem 1rem; font-weight: bold; font-size: 15px; color: #2C1A00; } |
| 7 | .asm-step-num { background: #1a1a1a; color: white; padding: 0.6rem 1.1rem; font-weight: bold; font-size: 15px; display: flex; align-items: center; white-space: nowrap; } |
| 8 | .asm-step-body { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 1rem; align-items: flex-start; } |
| 9 | .asm-step-text { flex: 1 1 250px; font-size: 13px; line-height: 1.6; } |
| 10 | .asm-step-figure { flex: 0 1 280px; text-align: center; } |
| 11 | .asm-step-figure img { max-width: 100%; height: auto; border: 1px solid #ccc; border-radius: 4px; } |
| 12 | .asm-step-figure span { display: block; font-size: 12px; color: #666; margin-top: 0.3rem; } |
| 13 | .asm-fullwidth { padding: 1rem; border-top: 1px solid #eee; font-size: 13px; } |
| 14 | .asm-fullwidth img { max-width: 100%; height: auto; border: 1px solid #ccc; border-radius: 4px; display: block; margin: 0.5rem auto; } |
| 15 | .asm-info { background: #f9f9f9; border: 1px solid #ddd; border-radius: 8px; padding: 1rem; margin-bottom: 1.5rem; font-size: 13px; line-height: 1.8; } |
| 16 | .asm-info h2 { font-size: 15px; margin: 0 0 0.5rem 0; color: #2C1A00; } |
| 17 | .ref-table { border-collapse: collapse; width: 100%; font-size: 12px; margin-top: 0.5rem; } |
| 18 | .ref-table td { border: 1px solid #ddd; padding: 0.3rem 0.6rem; } |
| 19 | .ref-table td:nth-child(odd) { background: #e8e8e8; text-align: center; font-weight: bold; } |
| 20 | .ref-table td:nth-child(even) { background: #fff; } |
| 21 | .ref-table tr:first-child td { background: #ccc; font-weight: bold; text-align: center; } |
| 22 | .code-block { background: #1a1a1a; color: #f0f0f0; font-family: 'Courier New', monospace; font-size: 12px; padding: 1rem; border-radius: 6px; white-space: pre; overflow-x: auto; margin-top: 0.75rem; line-height: 1.6; } |
| 23 | h1 { font-size: 18px; margin-bottom: 0.25rem; } |
| 24 | </style> |
| 25 | |
| 26 | <div class="asm"> |
| 27 | |
| 28 | <!-- Header --> |
| 29 | <div style="padding: 0.5rem 0 1rem 0;"> |
| 30 | <h1>The Complete Hexapod 2 Tutorial</h1> |
| 31 | <p><b>Updated January 26, 2007</b></p> |
| 32 | </div> |
| 33 | |
| 34 | <!-- Requirements --> |
| 35 | <div class="asm-info"> |
| 36 | <h2>Hardware</h2> |
| 37 | <p>SSC-32, Bot Board / BASIC Atom 28, PS2 Cable, PS2 Wireless Controller (not included), Extreme Hexapod 2, L5/L6 Arm (optional), Sharp GP2D12 Sensor (optional)</p> |
| 38 | <h2>Software</h2> |
| 39 | <p> |
| 40 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/ses-software/lynxterm/" target="_blank">LynxTerm</a> | Basic Micro Atom IDE ver 2.2.1.1<br> |
| 41 | Note: if your Basic Atom chip has a "Rev-D" label on the bottom, you <i>must</i> use IDE v5.3.1.3.<br><br> |
| 42 | Hexapod Programs: |
| 43 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog1.zip" target="_blank">h2prog1.zip</a> | |
| 44 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog2.zip" target="_blank">h2prog2.zip</a> | |
| 45 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog3.zip" target="_blank">h2prog3.zip</a> | |
| 46 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog4.zip" target="_blank">h2prog4.zip</a> | |
| 47 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2l56p5.zip" target="_blank">h2l56p5.zip</a> | |
| 48 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog6.zip" target="_blank">h2prog6.zip</a> | |
| 49 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog7.zip" target="_blank">h2prog7.zip</a> Autonomous |
| 50 | </p> |
| 51 | <h2>Resources</h2> |
| 52 | <p> |
| 53 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/wd001.gif" target="_blank">Wiring Schematic (wd001.gif)</a> | |
| 54 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2l56wd.gif" target="_blank">Wiring Schematic (h2l56wd.gif)</a> |
| 55 | </p> |
| 56 | <h2>Goal</h2> |
| 57 | <p>Install, program, and test the electronics to operate a Hexapod 2 with optional L5/L6 arm from a Lynxmotion, MadCatz, Pelican, or Hiteck wireless controller.</p> |
| 58 | </div> |
| 59 | |
| 60 | <!-- Step 1 --> |
| 61 | <div class="asm-step"> |
| 62 | <div class="asm-step-header"> |
| 63 | <div class="asm-step-name">Hexapod 2 Tutorial — Install Electronics</div> |
| 64 | <div class="asm-step-num">Step 1 / 15</div> |
| 65 | </div> |
| 66 | <div class="asm-step-body"> |
| 67 | <div class="asm-step-text"> |
| 68 | <p>Install the Bot Board and SSC-32 onto the top of the robot as shown.</p> |
| 69 | </div> |
| 70 | <div class="asm-step-figure"> |
| 71 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/eh209s.jpg"> |
| 72 | <span>Figure 1.</span> |
| 73 | </div> |
| 74 | </div> |
| 75 | </div> |
| 76 | |
| 77 | <!-- Step 2 --> |
| 78 | <div class="asm-step"> |
| 79 | <div class="asm-step-header"> |
| 80 | <div class="asm-step-name">Hexapod 2 Tutorial — Connect Power Wires</div> |
| 81 | <div class="asm-step-num">Step 2 / 15</div> |
| 82 | </div> |
| 83 | <div class="asm-step-body"> |
| 84 | <div class="asm-step-text"> |
| 85 | <p>Connect power wires for the servos as illustrated. Install VS1=VS2, VL=VS1, TX and RX, and both Baud jumpers for these tests. This will set the Baud rate to 115.2k and allow DB9 communications. Consult the SSC-32 user manual for more detailed information.</p> |
| 86 | </div> |
| 87 | <div class="asm-step-figure"> |
| 88 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/wd001.gif" target="_blank"> |
| 89 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/wd001.jpg"> |
| 90 | </a> |
| 91 | <span>Figure 2. (click for printable version)</span> |
| 92 | </div> |
| 93 | </div> |
| 94 | </div> |
| 95 | |
| 96 | <!-- Step 3 --> |
| 97 | <div class="asm-step"> |
| 98 | <div class="asm-step-header"> |
| 99 | <div class="asm-step-name">Hexapod 2 Tutorial — Connect Servos</div> |
| 100 | <div class="asm-step-num">Step 3 / 15</div> |
| 101 | </div> |
| 102 | <div class="asm-step-body"> |
| 103 | <div class="asm-step-text"> |
| 104 | <p>Connect the servos to their appropriate I/O channels. See Table 3 and consult the SSC-32 user manual. Double check your work — the header pins are close and numerous.</p> |
| 105 | <table class="ref-table" style="margin-top: 0.75rem;"> |
| 106 | <tr><td>SSC-32 I/O</td><td>Servo</td></tr> |
| 107 | <tr><td>00</td><td>Right Rear Vertical</td></tr> |
| 108 | <tr><td>01</td><td>Right Rear Horizontal</td></tr> |
| 109 | <tr><td>02</td><td>Right Middle Vertical</td></tr> |
| 110 | <tr><td>03</td><td>Right Middle Horizontal</td></tr> |
| 111 | <tr><td>04</td><td>Right Front Vertical</td></tr> |
| 112 | <tr><td>05</td><td>Right Front Horizontal</td></tr> |
| 113 | <tr><td>16</td><td>Left Rear Vertical</td></tr> |
| 114 | <tr><td>17</td><td>Left Rear Horizontal</td></tr> |
| 115 | <tr><td>18</td><td>Left Middle Vertical</td></tr> |
| 116 | <tr><td>19</td><td>Left Middle Horizontal</td></tr> |
| 117 | <tr><td>20</td><td>Left Front Vertical</td></tr> |
| 118 | <tr><td>21</td><td>Left Front Horizontal</td></tr> |
| 119 | </table> |
| 120 | </div> |
| 121 | <div class="asm-step-figure"> |
| 122 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/eh213s.jpg"> |
| 123 | <span>Figure 3.</span> |
| 124 | </div> |
| 125 | </div> |
| 126 | </div> |
| 127 | |
| 128 | <!-- Step 4 --> |
| 129 | <div class="asm-step"> |
| 130 | <div class="asm-step-header"> |
| 131 | <div class="asm-step-name">Hexapod 2 Tutorial — Connect Serial Cable</div> |
| 132 | <div class="asm-step-num">Step 4 / 15</div> |
| 133 | </div> |
| 134 | <div class="asm-step-body"> |
| 135 | <div class="asm-step-text"> |
| 136 | <p><b>Step 4a.</b> Connect the serial data cable to the PC's serial port (recognized by 9 pins that stick out).</p> |
| 137 | <p><b>Step 4b.</b> Connect the other end of the serial data cable to the SSC-32's DB9 port. Turn on the power.</p> |
| 138 | <p>Note: you can also use an IOGear USB-to-Serial adaptor.</p> |
| 139 | </div> |
| 140 | <div class="asm-step-figure"> |
| 141 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/comp.jpg"> |
| 142 | <span>Figure 4.</span> |
| 143 | </div> |
| 144 | </div> |
| 145 | </div> |
| 146 | |
| 147 | <!-- Step 5 --> |
| 148 | <div class="asm-step"> |
| 149 | <div class="asm-step-header"> |
| 150 | <div class="asm-step-name">Hexapod 2 Tutorial — Install & Test LynxTerm</div> |
| 151 | <div class="asm-step-num">Step 5 / 15</div> |
| 152 | </div> |
| 153 | <div class="asm-step-body"> |
| 154 | <div class="asm-step-text"> |
| 155 | <p>Install and run LynxTerm on your PC. Choose the COM port from the drop down menu in the upper left corner.</p> |
| 156 | <p>Click in the black text box and type "ver". If everything is working correctly, you should receive a response such as "SSC32-1.03XE".</p> |
| 157 | <p>Note: if text goes below the bottom of the box, it may be necessary to change font settings and/or the number of rows under Terminal Setup.</p> |
| 158 | </div> |
| 159 | <div class="asm-step-figure"> |
| 160 | <a href="https://www.lynxmotion.com/images/assembly/eh2v4/lterm01.jpg" target="_blank"> |
| 161 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/lterm01s.jpg"> |
| 162 | </a> |
| 163 | <span>Figure 5. (click to enlarge)</span> |
| 164 | </div> |
| 165 | </div> |
| 166 | </div> |
| 167 | |
| 168 | <!-- Step 6 --> |
| 169 | <div class="asm-step"> |
| 170 | <div class="asm-step-header"> |
| 171 | <div class="asm-step-name">Hexapod 2 Tutorial — Aligning the Servos</div> |
| 172 | <div class="asm-step-num">Step 6 / 15</div> |
| 173 | </div> |
| 174 | <div class="asm-step-body"> |
| 175 | <div class="asm-step-text"> |
| 176 | <p>Click on the Sequencer button in the lower left corner. Click "All = 1500" and notice the hexapod legs hold position. If the robot was constructed properly, the legs will be horizontal and perpendicular to the body.</p> |
| 177 | <p>If your robot does not have mechanical alignment, use the Offset tool under Servo Quick Test. Select each servo on the Hexapod diagram and adjust the offset slider. Do this for all twelve servos. When completed, click Config to display configuration data. The lines starting with "#0PO" can be cut and pasted into the serout command in the included programs — search for "Servo Offset" in the supplied programs and follow the instructions.</p> |
| 178 | </div> |
| 179 | <div class="asm-step-figure"> |
| 180 | <a href="https://www.lynxmotion.com/images/assembly/eh2v4/lterm02.jpg" target="_blank"> |
| 181 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/lterm02s.jpg"> |
| 182 | </a> |
| 183 | <span>Figure 6. (click to enlarge)</span> |
| 184 | </div> |
| 185 | </div> |
| 186 | </div> |
| 187 | |
| 188 | <!-- Step 7 --> |
| 189 | <div class="asm-step"> |
| 190 | <div class="asm-step-header"> |
| 191 | <div class="asm-step-name">Hexapod 2 Tutorial — Hexapod Sequencer</div> |
| 192 | <div class="asm-step-num">Step 7 / 15</div> |
| 193 | </div> |
| 194 | <div class="asm-step-body"> |
| 195 | <div class="asm-step-text"> |
| 196 | <p>The L* and R* textboxes control the positions the legs move to in the sequence. Fine-tune these values using the Servo Quick Test position slider.</p> |
| 197 | <table class="ref-table" style="margin-top: 0.75rem;"> |
| 198 | <tr><td colspan="4">Tripod Leg Movement Sequence</td></tr> |
| 199 | <tr><td>LF</td><td>Left Front Horiz</td><td>RF</td><td>Right Front Horiz</td></tr> |
| 200 | <tr><td>LH</td><td>Left High Vertical</td><td>RH</td><td>Right High Vertical</td></tr> |
| 201 | <tr><td>LM</td><td>Left Middle Vertical</td><td>RM</td><td>Right Mid Vertical</td></tr> |
| 202 | <tr><td>LL</td><td>Left Low Vertical</td><td>RL</td><td>Right Low Vertical</td></tr> |
| 203 | <tr><td>LR</td><td>Left Rear Horiz</td><td>RR</td><td>Right Rear Horiz</td></tr> |
| 204 | </table> |
| 205 | </div> |
| 206 | <div class="asm-step-figure"> |
| 207 | <a href="https://www.lynxmotion.com/images/assembly/eh2v4/lterm04.jpg" target="_blank"> |
| 208 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/lterm04s.jpg"> |
| 209 | </a> |
| 210 | <span>Figure 7. (click to enlarge)</span> |
| 211 | </div> |
| 212 | </div> |
| 213 | </div> |
| 214 | |
| 215 | <!-- Step 8 --> |
| 216 | <div class="asm-step"> |
| 217 | <div class="asm-step-header"> |
| 218 | <div class="asm-step-name">Hexapod 2 Tutorial — Walking the Robot</div> |
| 219 | <div class="asm-step-num">Step 8 / 15</div> |
| 220 | </div> |
| 221 | <div class="asm-step-body"> |
| 222 | <div class="asm-step-text"> |
| 223 | <p>Adjust the XL and XR sliders to 100%. Set the XS slider to ~50% and notice the stride takes 3 seconds. Adjust HT to 1000 and the stride now takes 2 seconds.</p> |
| 224 | <p>You have complete control over all aspects of the tripod gait. Adjust XL or XR lower to do gradual turns. Setting them to opposite directions causes the robot to turn in place. Reverse values cause backward walking.</p> |
| 225 | </div> |
| 226 | <div class="asm-step-figure"> |
| 227 | <a href="https://www.lynxmotion.com/images/assembly/eh2v4/lterm03.jpg" target="_blank"> |
| 228 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/lterm03s.jpg"> |
| 229 | </a> |
| 230 | <span>Figure 8. (click to enlarge)</span> |
| 231 | </div> |
| 232 | </div> |
| 233 | </div> |
| 234 | |
| 235 | <!-- Step 9 --> |
| 236 | <div class="asm-step"> |
| 237 | <div class="asm-step-header"> |
| 238 | <div class="asm-step-name">Hexapod 2 Tutorial — Sample Walking Code</div> |
| 239 | <div class="asm-step-num">Step 9 / 15</div> |
| 240 | </div> |
| 241 | <div class="asm-step-body"> |
| 242 | <div class="asm-step-text"> |
| 243 | <p>Remove the TX and RX jumpers, install the data cable to the Bot Board, and configure the Baud rate jumpers for 38.4k. To change speed and direction, alter the XL, XR, XS values.</p> |
| 244 | <div class="code-block">XL var sbyte |
| 245 | XR var sbyte |
| 246 | XS var byte |
| 247 | |
| 248 | XL = 100 |
| 249 | XR = 100 |
| 250 | XS = 100 |
| 251 | |
| 252 | start: |
| 253 | serout p15,i38400,["LF1700 RF1300 LR1300",13] |
| 254 | serout p15,i38400,["RR1700 LH1000 LM1700",13] |
| 255 | serout p15,i38400,["LL1800 RH2000 RM1300",13] |
| 256 | serout p15,i38400,["RL1200 VS3000 HT1500",13] |
| 257 | serout p15,i38400,["XL",SDEC XL,"XR",SDEC XR,13] |
| 258 | serout p15,i38400,["XS",DEC XS,13] |
| 259 | loop: |
| 260 | goto loop</div> |
| 261 | </div> |
| 262 | </div> |
| 263 | </div> |
| 264 | |
| 265 | <!-- Step 10 --> |
| 266 | <div class="asm-step"> |
| 267 | <div class="asm-step-header"> |
| 268 | <div class="asm-step-name">Hexapod 2 Tutorial — PS2 Programs</div> |
| 269 | <div class="asm-step-num">Step 10 / 15</div> |
| 270 | </div> |
| 271 | <div class="asm-step-body"> |
| 272 | <div class="asm-step-text"> |
| 273 | <p>Install and run the BASIC Atom IDE to allow programming the chip. The following programs offer complete control through a wireless PS2 controller.</p> |
| 274 | <table class="ref-table" style="margin-top: 0.75rem;"> |
| 275 | <tr><td>Filename</td><td>Description</td></tr> |
| 276 | <tr><td><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog1.zip" target="_blank">h2prog1.zip</a></td><td>Differential tank-steer mode</td></tr> |
| 277 | <tr><td><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog2.zip" target="_blank">h2prog2.zip</a></td><td>Above, and single joystick mode</td></tr> |
| 278 | <tr><td><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog3.zip" target="_blank">h2prog3.zip</a></td><td>Above, and leg high-position adjustable</td></tr> |
| 279 | <tr><td><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog4.zip" target="_blank">h2prog4.zip</a></td><td>Above, leg low-pos. adjustable and obstacle detection</td></tr> |
| 280 | <tr><td><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2l56p5.zip" target="_blank">h2l56p5.zip</a></td><td>Above, and L5/L6 arm control</td></tr> |
| 281 | <tr><td><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog6.zip" target="_blank">h2prog6.zip</a></td><td>Same as h2prog4, single joystick mode and pan-and-tilt on left joystick</td></tr> |
| 282 | </table> |
| 283 | </div> |
| 284 | <div class="asm-step-figure"> |
| 285 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/eh2l56s.jpg"> |
| 286 | <span>Figure 10.</span> |
| 287 | </div> |
| 288 | </div> |
| 289 | </div> |
| 290 | |
| 291 | <!-- Step 11 --> |
| 292 | <div class="asm-step"> |
| 293 | <div class="asm-step-header"> |
| 294 | <div class="asm-step-name">Hexapod 2 Tutorial — Wiring the Robot</div> |
| 295 | <div class="asm-step-num">Step 11 / 15</div> |
| 296 | </div> |
| 297 | <div class="asm-step-body"> |
| 298 | <div class="asm-step-text"> |
| 299 | <p>Wire your robot as illustrated in the wiring diagram. The Sharp GP2D12 is not required, but offers crash protection if installed.</p> |
| 300 | <p>You can use a 7.2VDC battery for best performance, however if installing an L5 or L6 arm, 6.0VDC is recommended due to the micro servo on the gripper. For increased runtime, you can power the logic of the Bot Board and SSC-32 from a 9V battery — remember to remove the VS=VL jumpers on both boards.</p> |
| 301 | <p>Install the speaker enable jumper for audible feedback. Install the PS2 receiver module and put fresh batteries in your controller. When you run the program, you should hear beeps until the game controller is recognized. Press the Analog button and the legs should hold position.</p> |
| 302 | </div> |
| 303 | <div class="asm-step-figure"> |
| 304 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2l56wd.gif" target="_blank"> |
| 305 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2l56wd.jpg"> |
| 306 | </a> |
| 307 | <span>Figure 11. (click for printable version)</span> |
| 308 | </div> |
| 309 | </div> |
| 310 | </div> |
| 311 | |
| 312 | <!-- Step 12 --> |
| 313 | <div class="asm-step"> |
| 314 | <div class="asm-step-header"> |
| 315 | <div class="asm-step-name">Hexapod 2 Tutorial — Install PS2 Cable</div> |
| 316 | <div class="asm-step-num">Step 12 / 15</div> |
| 317 | </div> |
| 318 | <div class="asm-step-body"> |
| 319 | <div class="asm-step-text"> |
| 320 | <p>Install the Playstation 2 cable as illustrated in Figures 12-1 and 12-2.</p> |
| 321 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/wire07s.gif" style="max-width:100%; border:1px solid #ccc; border-radius:4px; margin-top:0.5rem;"> |
| 322 | <p style="font-size:12px; color:#666; margin-top:0.3rem;">Figure 12-1.</p> |
| 323 | </div> |
| 324 | <div class="asm-step-figure"> |
| 325 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/ps2abb02.jpg"> |
| 326 | <span>Figure 12-2.</span> |
| 327 | </div> |
| 328 | </div> |
| 329 | </div> |
| 330 | |
| 331 | <!-- Step 13 --> |
| 332 | <div class="asm-step"> |
| 333 | <div class="asm-step-header"> |
| 334 | <div class="asm-step-name">Hexapod 2 Tutorial — PS2 Control Modes</div> |
| 335 | <div class="asm-step-num">Step 13 / 15</div> |
| 336 | </div> |
| 337 | <div class="asm-step-body"> |
| 338 | <div class="asm-step-text"> |
| 339 | <p>Make sure the controller is in Analog mode. Mode 1 (default) uses differential/tank mode — the right joystick controls the right legs, and the left joystick controls the left legs. Mode 2 controls walking direction with the right joystick. Pressing R3 swaps between modes.</p> |
| 340 | <p>Both modes offer control of leg trajectory. Pressing △, O (default), X, or □ changes how the foot is lifted. Control max vertical height with R1/R2. Control max low position with L1/L2 or D-Pad Up/Down.</p> |
| 341 | <p>If the robot is driven toward an obstacle, the forward joystick position is ignored after a threshold is reached. The controller will vibrate proportionally to obstacle distance. The Sharp sensor can be enabled/disabled with the Start button.</p> |
| 342 | </div> |
| 343 | <div class="asm-step-figure"> |
| 344 | <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/legtraj.gif" target="_blank"> |
| 345 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/legtraj.jpg"> |
| 346 | </a> |
| 347 | <span>Figure 13. (click to enlarge)</span> |
| 348 | </div> |
| 349 | </div> |
| 350 | </div> |
| 351 | |
| 352 | <!-- Step 14 --> |
| 353 | <div class="asm-step"> |
| 354 | <div class="asm-step-header"> |
| 355 | <div class="asm-step-name">Hexapod 2 Tutorial — PS2 Control Reference</div> |
| 356 | <div class="asm-step-num">Step 14 / 15</div> |
| 357 | </div> |
| 358 | <div class="asm-step-body"> |
| 359 | <div class="asm-step-text"> |
| 360 | <p>The Select button switches between Hexapod and Arm control modes.</p> |
| 361 | <p><b>Arm control:</b> Move X and Y with the Left joystick, move Z (Base Rotate) and Wrist Angle with the Right joystick, close/open gripper with L1/L2, turn Wrist (L6 only) with R1/R2, invert X axis with L3, initialize Arm position with X, disable/enable Arm servos with △.</p> |
| 362 | <p><b>PS2 Controls — Default Tank Mode:</b></p> |
| 363 | <table class="ref-table"> |
| 364 | <tr><td>L Joy U</td><td>Left Side Forward</td><td>R Joy U</td><td>Right Side Forward</td></tr> |
| 365 | <tr><td>L Joy D</td><td>Left Side Backward</td><td>R Joy D</td><td>Right Side Backward</td></tr> |
| 366 | <tr><td>L1</td><td>Raise body height</td><td>R1</td><td>Increase leg lift</td></tr> |
| 367 | <tr><td>L2</td><td>Lower body height</td><td>R2</td><td>Decrease leg lift</td></tr> |
| 368 | <tr><td>L3</td><td>N/A</td><td>R3</td><td>Switch control mode</td></tr> |
| 369 | <tr><td>D-Pad U</td><td>Raise body height</td><td>△</td><td>Figure 12</td></tr> |
| 370 | <tr><td>D-Pad D</td><td>Lower body height</td><td>X</td><td>Figure 12</td></tr> |
| 371 | <tr><td>D-Pad L</td><td>Speed Limit Down</td><td>□</td><td>Figure 12</td></tr> |
| 372 | <tr><td>D-Pad R</td><td>Speed Limit Up</td><td>O</td><td>Figure 12</td></tr> |
| 373 | <tr><td>Start</td><td>Dis/En Crash Monitor</td><td>Select</td><td>Switch to Arm mode</td></tr> |
| 374 | </table> |
| 375 | <p style="margin-top: 1rem;"><b>PS2 Controls — Right-Joystick Mode:</b></p> |
| 376 | <table class="ref-table"> |
| 377 | <tr><td>L Joy U/D/L/R</td><td>N/A</td><td>R Joy U</td><td>Forward</td></tr> |
| 378 | <tr><td></td><td></td><td>R Joy D</td><td>Backward</td></tr> |
| 379 | <tr><td></td><td></td><td>R Joy L</td><td>Left</td></tr> |
| 380 | <tr><td></td><td></td><td>R Joy R</td><td>Right</td></tr> |
| 381 | </table> |
| 382 | <p style="margin-top: 1rem;"><b>PS2 Controls — Arm Control:</b></p> |
| 383 | <table class="ref-table"> |
| 384 | <tr><td>L Joy</td><td>Move X and Y</td><td>R Joy</td><td>Move Z and Wrist</td></tr> |
| 385 | <tr><td>L1</td><td>Close Gripper</td><td>R1</td><td>Turn Wrist Right</td></tr> |
| 386 | <tr><td>L2</td><td>Open Gripper</td><td>R2</td><td>Turn Wrist Left</td></tr> |
| 387 | <tr><td>L3</td><td>Invert X Axis</td><td>R3</td><td>Switch control mode</td></tr> |
| 388 | <tr><td>X</td><td>Home Position</td><td>△</td><td>Disable/Enable Servos</td></tr> |
| 389 | </table> |
| 390 | </div> |
| 391 | <div class="asm-step-figure"> |
| 392 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/eh212s.jpg"> |
| 393 | <span>Figure 14.</span> |
| 394 | </div> |
| 395 | </div> |
| 396 | </div> |
| 397 | |
| 398 | <!-- Step 15 --> |
| 399 | <div class="asm-step"> |
| 400 | <div class="asm-step-header"> |
| 401 | <div class="asm-step-name">Hexapod 2 Tutorial — Autonomous Control</div> |
| 402 | <div class="asm-step-num">Step 15 / 15</div> |
| 403 | </div> |
| 404 | <div class="asm-step-body"> |
| 405 | <div class="asm-step-text"> |
| 406 | <p>The autonomous program requires three Sharp GP2D12 sensors connected as follows:</p> |
| 407 | <ul> |
| 408 | <li>A to D channel 0: front left side, facing right</li> |
| 409 | <li>A to D channel 1: front right side, facing left</li> |
| 410 | <li>A to D channel 2: rear, facing behind the robot</li> |
| 411 | </ul> |
| 412 | <table class="ref-table" style="margin-top: 0.75rem;"> |
| 413 | <tr><td>Filename</td><td>Description</td></tr> |
| 414 | <tr><td><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/h2prog7.zip" target="_blank">h2prog7.zip</a></td><td>Autonomous using two Sharp GP2D12 sensors and one on the rear</td></tr> |
| 415 | </table> |
| 416 | </div> |
| 417 | <div class="asm-step-figure"> |
| 418 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-2dof-hexapods/the-complete-hexapod-2-tutorial/WebHome/eh200s.jpg"> |
| 419 | <span>Figure 15.</span> |
| 420 | </div> |
| 421 | </div> |
| 422 | </div> |
| 423 | |
| 424 | </div> |
| 425 | {{/html}} |

