28125 Parallax Inc, 28125 Datasheet - Page 169

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
pulseLeft
' -----[ EEPROM Data ]--------------------------------------------------------
' addressOffset
Pulses_Count DATA
Pulses_Left
Pulses_Right DATA
' -----[ Initialization ]-----------------------------------------------------
FREQOUT 4, 2000, 3000
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP UNTIL (pulseCount = 0)
END
Did your Boe-Bot perform the familiar forward-left-right-backwards movements? Are
you thoroughly bored with it by now? Do you want to see your Boe-Bot do something
else, or to choreograph your own routine?
Your Turn – Making Your Own Custom Navigation Routines
Pulses_Count DATA Word 60,
Pulses_Left
READ Pulses_Count + addressOffset, Word pulseCount
READ Pulses_Left + addressOffset, Word pulseLeft
READ Pulses_Right + addressOffset, Word pulseRight
addressOffset = addressOffset + 2
FOR counter = 1 TO pulseCount
NEXT
PULSOUT 13, pulseLeft
PULSOUT 12, pulseRight
PAUSE 20
Save EepromNavigationWithWordValues.bs2. under a new name.
Replace the
Run the modified program and see what your Boe-Bot does.
DATA
DATA Word 850, Word 800, Word 785, Word 760, Word 750,
VAR
DATA
Word 110, Word 100, Word 80,
0
Word 64,
Word 850, Word 650, Word 850, Word 650
Word 650, Word 650, Word 850, Word 850
Word
directives with the ones below.
Word 80,
2
Word 24,
4
Word 24,
Word 100, Word 110,
' Signal program start/reset.
' Stop executing until reset.
6
Word 64, Word 0
Word 60, Word 0
8

Related parts for 28125