Chapter 4: Boe-Bot Navigation
· Page 151
' -----[ Subroutine – Right_Turn ]--------------------------------------------
Right_Turn: ' right turn subroutine.
FOR pulseCount = 1 TO 24 ' Send 24 right rotate pulses.
PULSOUT 13, 850 ' 1.7 ms pulse to left servo.
PULSOUT 12, 850 ' 1.7 ms pulse to right servo.
PAUSE 20 ' Pause for 20 ms.
NEXT
RETURN ' Return to Main Routine section.
Did your Boe-Bot drive in a rectangle, going forward on the first two sides and
backwards on the second two? If it looked more like a trapezoid, you may want to adjust
the
FOR
...
NEXT
loop's
EndValue
arguments in the turning subroutines to make precise 90-
degree turns.
Your Turn
√
With EepromNavigation.bs2 active in the BASIC Stamp Editor, click
Run
and
select
Memory Map
.
Your stored instructions will appear highlighted in blue at the beginning of the Detailed
EEPROM Map as shown in Figure 4-7. The numbers shown are the hexadecimal ASCII
(American Standard Code for Information Interchange) codes that correspond to the
characters you entered in your
DATA
statement.
Figure 4-7
Memory Map
with Stored
Instructions
Visible in
EEPROM Map
√
Click the
Display ASCII
checkbox near the lower left corner of the
Memory Map
window.