Wiki source code of A4WD1 Tutorial for Autonomous Behavior v1.0
Last modified by Eric Nantel on 2023/01/30 10:28
Hide last authors
![]() |
1.1 | 1 | {{html wiki="false" clean="true"}} |
![]() |
18.1 | 2 | <body><table border="0" cellpadding="0" cellspacing="0" > |
3 | <tbody><tr> | ||
4 | <td valign="top" align="left"><b><font size="2" face="Verdana">A4WD1 Tutorial for Autonomous Behavior v1.0</font></b> | ||
5 | <p><b><font size="2" face="Verdana">Updated 12/20/2011</font></b></p> | ||
6 | <p><font face="Verdana" size="2"><b>Safety first!</b> Wear eye protection and never touch a powered robot!</font></p> | ||
7 | <p><font size="2" face="Verdana">Note: Do not use Loctite or thread locks on the assembly. They are not necessary and may cause damage to the | ||
8 | Lexan.</font></p> | ||
9 | <p><font size="2" face="Verdana">Note: This guide follows the assembly guide. The Sabertooth has already been installed.</font></p> | ||
10 | <p><font size="2" face="Verdana"><b>Software:<br> | ||
11 | </b> - Basic Micro Studio</font></p></td> | ||
12 | <td align="center" valign="top" width="320"><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/auton03.jpg" border="2" hspace="10" ><br> | ||
13 | <b>Image of A4WD1.</b></font></td> | ||
14 | </tr> | ||
15 | <tr> | ||
16 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font> | ||
17 | <hr color="#808080"> | ||
18 | </td> | ||
19 | </tr> | ||
20 | <tr> | ||
21 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
22 | </tr> | ||
23 | <tr> | ||
24 | <td valign="top" align="left"><b><font size="2" face="Verdana">Step 1. Mounting the Bot Board II</font></b><font size="2" face="Verdana"><br> | ||
25 | Add the four standoffs for the Bot Board II to the robot's top panel as shown. Use four .250" hex socket head screws.</font><font face="Verdana, Helvetica, sans-serif" size="2"><br> | ||
26 | </font> | ||
27 | <table border="0" > | ||
28 | <tbody><tr> | ||
29 | <td ><font size="2" face="Verdana"><b>4 x</b></font></td> | ||
30 | <td ><font size="2" face="Verdana"><b>4 x</b></font></td> | ||
31 | </tr> | ||
32 | <tr> | ||
33 | <td ><font face="Verdana" size="2"><b><img border="2" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/4250hscs.gif" ></b></font></td> | ||
34 | <td ><font face="Verdana" size="2"><b><img border="2" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/4375hns.gif" ></b></font></td> | ||
35 | </tr> | ||
36 | </tbody></table> | ||
37 | </td> | ||
38 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/a4wd1p01.jpg" border="2" hspace="10" ><br> | ||
39 | Figure 1.</font></td> | ||
40 | </tr> | ||
41 | <tr> | ||
42 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
43 | </tr> | ||
44 | <tr> | ||
45 | <td valign="top" align="left"><b><font size="2" face="Verdana">Step 2.</font></b><font size="2" face="Verdana"><br> | ||
46 | Install the Bot Board as shown, using four of the .250" 4-40 screws. Install the Atom Pro chip as shown.</font><font face="Verdana, Helvetica, sans-serif" size="2"><br> | ||
47 | </font> | ||
48 | <table border="0" > | ||
49 | <tbody><tr> | ||
50 | <td ><font size="2" face="Verdana"><b>4 x</b></font></td> | ||
51 | <td ><font size="2" face="Verdana"><b>Atom Pro Orientation:</b></font></td> | ||
52 | </tr> | ||
53 | <tr> | ||
54 | <td ><font face="Verdana" size="2"><b><img border="2" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/4250hscs.gif" ></b></font></td> | ||
55 | <td ><font face="Verdana" size="2"><b><img border="2" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/aproinst.gif" ></b></font></td> | ||
56 | </tr> | ||
57 | </tbody></table> | ||
58 | </td> | ||
59 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/a4wd1p02.jpg" border="2" hspace="10" ><br> | ||
60 | Figure 2.</font></td> | ||
61 | </tr> | ||
62 | <tr> | ||
63 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
64 | </td> | ||
65 | </tr> | ||
66 | <tr> | ||
67 | <td valign="top" align="left"><font size="2" face="Verdana"><b>Step 3. Connecting Sabertooth to Bot Board II</b><br> | ||
68 | The Sabertooth 2x10 R/C was primarily designed to be connected to a remote control receiver. It has a BEC (battery elimination circuit) that | ||
69 | puts 5vdc on the red wires to power the receiver. Because the Bot Board II has its own power supply, it is necessary to bypass the BEC.</font> | ||
70 | <p><font size="2" face="Verdana">Use an exacto knife to <b>carefully</b> pry the black tab up and slip the red wire out of the black housing as | ||
71 | shown in Figure 3.</font></p> | ||
72 | <p><font size="2" face="Verdana">Bend the red wires up and use electrical tape to cover them as shown. This will prevent accidental shorts.</font></p> | ||
73 | </td> | ||
74 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/stbec.jpg" border="2" hspace="10" ><br> | ||
75 | Figure 3.</font></td> | ||
76 | </tr> | ||
77 | <tr> | ||
78 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
79 | </tr> | ||
80 | <tr> | ||
81 | <td valign="top" align="left"><b><font size="2" face="Verdana">Step 4.</font></b><font size="2" face="Verdana"><br> | ||
82 | Refer to Table 4 and the schematic (Figure 4) for Bot Board II and Sabertooth wiring connections. Double check your wiring. Make sure the red | ||
83 | battery wire goes to the (+) terminal!</font></td> | ||
84 | <td align="center" valign="top" > | ||
85 | <div align="center"> | ||
86 | <center> | ||
87 | <table border="0"> | ||
88 | <tbody><tr> | ||
89 | <td > | ||
90 | <table border="1" bordercolor="#000000" > | ||
91 | <tbody><tr> | ||
92 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">Bot Board Jumpers | ||
93 | & Connections</font></td> | ||
94 | </tr> | ||
95 | <tr> | ||
96 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> | ||
97 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">6vdc battery to VS</font></td> | ||
98 | </tr> | ||
99 | <tr> | ||
100 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Enable</font></td> | ||
101 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Speaker</font></td> | ||
102 | </tr> | ||
103 | <tr> | ||
104 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Enable</font></td> | ||
105 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">A, B, C Button</font></td> | ||
106 | </tr> | ||
107 | <tr> | ||
108 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> | ||
109 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">VS to VL</font></td> | ||
110 | </tr> | ||
111 | <tr> | ||
112 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">Sabertooth | ||
113 | Connections</font></td> | ||
114 | </tr> | ||
115 | <tr> | ||
116 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> | ||
117 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">12vdc battery</font></td> | ||
118 | </tr> | ||
119 | <tr> | ||
120 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Ch1</font></td> | ||
121 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Bot Board II P0</font></td> | ||
122 | </tr> | ||
123 | <tr> | ||
124 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Ch2</font></td> | ||
125 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Bot Board II P1</font></td> | ||
126 | </tr> | ||
127 | </tbody></table> | ||
128 | </td> | ||
129 | </tr> | ||
130 | <tr> | ||
131 | <td > | ||
132 | <p align="center"><font size="2" face="Verdana">Table 4</font></p></td> | ||
133 | </tr> | ||
134 | </tbody></table> | ||
135 | </center> | ||
136 | </div></td> | ||
137 | </tr> | ||
138 | <tr> | ||
139 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
140 | </tr> | ||
141 | <tr> | ||
142 | <td valign="top" align="left"><font size="2" face="Verdana"><b>Step 5.</b><br> | ||
143 | Set the Sabertooth switches to the settings listed in Table 5 and Figure 5.<br> | ||
144 | </font> | ||
145 | <div align="center"> | ||
146 | <center> | ||
147 | <table border="0"> | ||
148 | <tbody><tr> | ||
149 | <td > | ||
150 | <table border="1" bordercolor="#000000" > | ||
151 | <tbody><tr> | ||
152 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">Sabertooth | ||
153 | Settings</font></td> | ||
154 | </tr> | ||
155 | <tr> | ||
156 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">1</font></td> | ||
157 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Independent Control</font></td> | ||
158 | </tr> | ||
159 | <tr> | ||
160 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">2</font></td> | ||
161 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Disable Exponential</font></td> | ||
162 | </tr> | ||
163 | <tr> | ||
164 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">3</font></td> | ||
165 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Non-Lithium Mode</font></td> | ||
166 | </tr> | ||
167 | <tr> | ||
168 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">4</font></td> | ||
169 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">R/C Flip Mode</font></td> | ||
170 | </tr> | ||
171 | <tr> | ||
172 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">5</font></td> | ||
173 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Disable Autocalibrate</font></td> | ||
174 | </tr> | ||
175 | <tr> | ||
176 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">6</font></td> | ||
177 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Disable Timeout</font></td> | ||
178 | </tr> | ||
179 | </tbody></table> | ||
180 | </td> | ||
181 | </tr> | ||
182 | <tr> | ||
183 | <td > | ||
184 | <p align="center"><font size="2" face="Verdana">Table 5</font></p></td> | ||
185 | </tr> | ||
186 | </tbody></table> | ||
187 | </center> | ||
188 | </div> | ||
189 | </td> | ||
190 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/st10rc02.gif" border="2" hspace="10" ><br> | ||
191 | Figure 5.</font></td> | ||
192 | </tr> | ||
193 | <tr> | ||
194 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
195 | </td> | ||
196 | </tr> | ||
197 | <tr> | ||
198 | <td valign="top" align="left" colspan="2"> | ||
199 | <p align="center"><font size="2" face="Verdana"><b>Schematic - Figure 5.<br> | ||
200 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/4wd1sch7.gif" ><br> | ||
201 | Schematic - Figure 5.</b></font></p> | ||
202 | </td> | ||
203 | </tr> | ||
204 | <tr> | ||
205 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
206 | </td> | ||
207 | </tr> | ||
208 | <tr> | ||
209 | <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 6. Programming the Atom Pro</b><br> | ||
![]() |
19.1 | 210 | Download the BASIC Micro Studio development |
![]() |
18.1 | 211 | software. Install and run the program on your PC. The goal here is to load a program into the editor and program the Atom Pro with the code. You |
212 | can use the serial port (D shaped connector with 9 pins sticking out) or a USB-to-serial cable. If you go the USB-to-serial cable route buy a | ||
213 | good quality name brand unit. When you have a feel for the program you can load and program your Basic Atom with the BASIC programs listed | ||
214 | below.</font> | ||
215 | <p><font face="Verdana" size="2">Now it's time to have some fun!</font></p> | ||
216 | </td> | ||
217 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/comp.jpg" border="2" hspace="10" ><br> | ||
218 | Figure 6.</font></td> | ||
219 | </tr> | ||
220 | <tr> | ||
221 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
222 | </tr> | ||
223 | <tr> | ||
224 | <td valign="top" align="left" colspan="2"><b><font size="2" face="Verdana">Step 7.</font></b><font size="2" face="Verdana"><b> | ||
225 | Differential or Tank Mode Test (Required)</b><br> | ||
226 | Download this file (<a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/a4wd1tst2.zip" target="_blank">a4wd1tst2.zip</a>) and run it. For this program, on the Bot Board II, | ||
227 | the "A" button is left channel throttle, "C" button is right channel throttle, and "B" is a speed and direction | ||
228 | reset.</font> | ||
229 | <p><font size="2" face="Verdana">This program requires the Sabertooth's Switch 1 to be flipped to the "Off" or "Independent | ||
230 | Control" position.</font></p> | ||
231 | <p><font size="2" face="Verdana">Upon powering up the robot, you should hear four ascending notes. Pressing A once results in a beep and slow | ||
232 | forward motion (10%) on the left channel only. Pressing nine more times results in 100% power. Continuing to press A will make the motor act as | ||
233 | above, except only for the right channel. The C button will control the left motor in a similar manner. Pressing the B button will reset the | ||
234 | speed and direction of both left and right.</font></p> | ||
235 | <p><font size="2" face="Verdana">Note: The Sabertooth's red Error LED will light to indicate overheating or current limit. The green Status1 LED | ||
236 | will glow dimly when power is applied, and brightly when it's receiving pulses from the microcontroller. The green Status2 LED will flash out | ||
237 | the detected number of lithium cells when lithium mode is enabled.</font></p></td> | ||
238 | </tr> | ||
239 | <tr> | ||
240 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
241 | </tr> | ||
242 | <tr> | ||
243 | <td valign="top" align="left" colspan="2"><b><font size="2" face="Verdana">Step 8.</font></b><font size="2" face="Verdana"><b> | ||
244 | Throttle and Steering Mode Test (Optional)</b><br> | ||
245 | This program requires the Sabertooth's Switch 1 is flipped into the "On" or "Enable Mixed Mode" position!</font> | ||
246 | <p><font size="2" face="Verdana">Download this file (<a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/a4wd1tst1.zip" target="_blank">a4wd1tst1.zip</a>) and run it. For | ||
247 | this program, on the Bot Board II, the "B" button is throttle and the "A" and "C" buttons are steering.</font></p> | ||
248 | <p><font size="2" face="Verdana">Upon powering up the robot, you should hear four ascending notes. Pressing B once results in a beep and | ||
249 | slow forward motion (10%). Pressing nine more times results in 100% power. After the motor is at 100% power, pressing B will reduce the speed in | ||
250 | 10% increments until it stops. Continue to press B to make the robot move as above, only in reverse.</font></p> | ||
251 | <p><font size="2" face="Verdana">Press Reset, then B twice. Now press C a few times to see the robot make a gradual left turn. Pressing A a few | ||
252 | times will return to forward motion, and continuing to press A will result in gradual right turn.</font></p> | ||
253 | <p><font size="2" face="Verdana">Experiment with these buttons to understand how throttle and steering can be used to control the vehicle's | ||
254 | motion.</font></p> | ||
255 | <p><font size="2" face="Verdana">Note: The Sabertooth's red Error LED will light to indicate overheating or current limit. The green Status1 LED | ||
256 | will glow dimly when power is applied, and brightly when it's receiving pulses from the microcontroller. The green Status2 LED will flash out | ||
257 | the detected number of lithium cells when lithium mode is enabled.</font></p> | ||
258 | <p><font size="2" face="Verdana"><i>When you're done with this testing program, flip the Sabertooth's Switch 1 back into the "Independent | ||
259 | Control" position!</i><br> | ||
260 | </font></p></td> | ||
261 | </tr> | ||
262 | <tr> | ||
263 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
264 | </td> | ||
265 | </tr> | ||
266 | <tr> | ||
267 | <td valign="top" align="left"><font face="Verdana"><b><font size="2">Step 9.</font></b><font size="2"><br> | ||
268 | Now it's time to set up the A4WD1 for autonomous behavior.</font></font> | ||
269 | <p><font size="2" face="Verdana">The code supports three Sharp GP2D12 sensors; two in the front and one in the back.</font></p></td> | ||
270 | <td align="center" valign="top" > | ||
271 | <div align="center"> | ||
272 | <center> | ||
273 | <table border="0"> | ||
274 | <tbody><tr> | ||
275 | <td > | ||
276 | <table border="1" bordercolor="#000000" > | ||
277 | <tbody><tr> | ||
278 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">Bot Board Jumpers | ||
279 | & Connections</font></td> | ||
280 | </tr> | ||
281 | <tr> | ||
282 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> | ||
283 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">AX 0-3 Power Bus Jumper to 5v</font></td> | ||
284 | </tr> | ||
285 | <tr> | ||
286 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">AX1</font></td> | ||
287 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Robot's front left sensor</font></td> | ||
288 | </tr> | ||
289 | <tr> | ||
290 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">AX2</font></td> | ||
291 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Robot's front right sensor</font></td> | ||
292 | </tr> | ||
293 | <tr> | ||
294 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">AX3</font></td> | ||
295 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Rear sensor</font></td> | ||
296 | </tr> | ||
297 | <tr> | ||
298 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">P0</font></td> | ||
299 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Sabertooth Ch1</font></td> | ||
300 | </tr> | ||
301 | <tr> | ||
302 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">P1</font></td> | ||
303 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Sabertooth Ch2</font></td> | ||
304 | </tr> | ||
305 | </tbody></table> | ||
306 | </td> | ||
307 | </tr> | ||
308 | <tr> | ||
309 | <td > | ||
310 | <p align="center"><font size="2" face="Verdana">Table 9</font></p></td> | ||
311 | </tr> | ||
312 | </tbody></table> | ||
313 | </center> | ||
314 | </div> | ||
315 | </td> | ||
316 | </tr> | ||
317 | <tr> | ||
318 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
319 | </tr> | ||
320 | <tr> | ||
321 | <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 10.</b><br> | ||
322 | Attach two GP2D12 sensors to the chassis as shown, using either double-sided foam tape or optional multi-purpose sensor housing brackets. The | ||
323 | exact angle isn't critical, but will affect the robot's behavior. Experimentation is encouraged.</font> | ||
324 | <p><font face="Verdana" size="2">Make sure you place the robot's right sensor on the robot's right side, facing left! Place the robot's left | ||
325 | sensor on the robot's left side, facing right! This overlap ensures there isn't a blind spot in the center. If you switch the positions of the | ||
326 | sensors accidentally, the robot will turn <i>into</i> objects, instead of away.</font></p> | ||
327 | <p><font face="Verdana" size="2">Attach the other GP2D12 sensor at the rear of the robot as shown. Use double-sided foam tape to hold it in | ||
328 | place.</font></p></td> | ||
329 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/auton01.jpg" border="2" hspace="10" ><br> | ||
330 | Figure 10.</font></td> | ||
331 | </tr> | ||
332 | <tr> | ||
333 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
334 | </tr> | ||
335 | <tr> | ||
336 | <td valign="top" align="left" colspan="2"> | ||
337 | <p align="center"><font size="2" face="Verdana"><b>Schematic - Figure 11.<br> | ||
338 | <br> | ||
339 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/4wd1sch6.gif" ><br> | ||
340 | <br> | ||
341 | Schematic - Figure 11.</b></font></p> | ||
342 | </td> | ||
343 | </tr> | ||
344 | <tr> | ||
345 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
346 | </tr> | ||
347 | <tr> | ||
348 | <td valign="top" align="left"><font face="Verdana"><b><font size="2">Step 12.</font></b><font size="2"><br> | ||
349 | </font></font><font size="2" face="Verdana">Download this file (<a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/4wd1auto.zip" target="_blank">4wd1auto.zip</a>) and | ||
350 | program the Atom Pro. You will want to set the bot on something so that the wheels aren't touching the ground.</font> | ||
351 | <p><font size="2" face="Verdana">This program allows the robot to roam around the room without bumping into things. It uses three Sharp GP2D12 | ||
352 | analog distance sensors to "see" things in its environment. Feel free to experiment with the variables and math in the main section of | ||
353 | the program. The robot does a very good job navigating without getting stuck. The motor control is based on the GP2D12 sensors with a bias for | ||
354 | forward motion. The robot will sometimes back up and turn even though there are no specific instructions to do so. Look for this and other | ||
355 | emergent behaviors during your experimentation.</font></p></td> | ||
356 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-autonomous/WebHome/auton02.jpg" border="2" hspace="10" ><br> | ||
357 | Figure 12.</font></td> | ||
358 | </tr> | ||
359 | </tbody></table> | ||
360 | </body> | ||
![]() |
1.1 | 361 | {{/html}} |