28125 Parallax Inc, 28125 Datasheet - Page 199
28125
Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet
1.28125.pdf
(360 pages)
Specifications of 28125
Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
- Current page: 199 of 360
- Download datasheet (5Mb)
Turn_Right:
Back_Up:
How EscapingCorners.bs2 Works
Since this program is a modified version of RoamingWithWhiskers.bs2, only new
features related to detecting and escaping corners are discussed here.
Three extra variables are created for detecting a corner. The nibble variable
store a value between 0 and 15. Since our target value for detecting a corner is 4, the size
of the variable is reasonable. Remember that a bit variable can store a single bit, either a
1 or a 0. The next two variables (
the right size for the job since they are used to store old values of
also bit variables.
These variables have to be initialized (given initial values). For the sake of making the
program easier to read,
Boe-Bot is stuck in a corner, it is reset to 1. The
so that it looks like one of the two whiskers was pressed some time before the program
started. This has to be done because the routine for detecting alternate corners always
compares an alternating pattern, either (
1
). Likewise,
NEXT
RETURN
FOR pulseCount = 0 TO 20
NEXT
RETURN
FOR pulseCount = 0 TO 40
NEXT
RETURN
PULSOUT 12, 650
PAUSE 20
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20
counter
old7
old5
old5
and
counter
old7
VAR
VAR
VAR
have to be different from each other.
is set to 1, and when it gets to 4 due to the fact that the
old7
Nib
Bit
Bit
IN5 = 1
and
old5
and
old7
) are both bit variables. These are also
' Right turn, about 90-degrees.
' Back up.
IN7 = 0
and
old5
) or (
IN7
variables have to be set
IN5 = 0
and
IN5
counter
, which are
and
IN7 =
can
Related parts for 28125
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: