28125 Parallax Inc, 28125 Datasheet - Page 158
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: 158 of 360
- Download datasheet (5Mb)
Backward:
You should recognize the pattern of movement your Boe-Bot makes; it is the same one
made by ForwardLeftRightBackward.bs2. Clearly there are many different ways to
structure a program that will result in the same movements. A third approach is given in
the example below.
Example Program – MovementsWithVariablesAndOneSubroutine.bs2
Here’s another example program that causes your Boe-Bot to perform the same
maneuvers, but it only uses one subroutine and some variables to do it.
You have surely noticed that up to this point each Boe-Bot maneuver has been
accomplished with similar code blocks. Compare these two snippets:
' Forward full speed
FOR counter = 1 TO 64
NEXT
What causes these two code blocks to perform different maneuvers are changes to the
FOR StartValue
These arguments can be variables, and these variables can be changed repeatedly during
program run time to generate different maneuvers. Instead of using separate subroutines
with specific
the same subroutine over and over. The key to making different maneuvers is to set the
variables to the correct values for the maneuver you want before calling the subroutine.
PAUSE 200
RETURN
FOR counter = 1 TO 64
NEXT
RETURN
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20
PULSOUT Duration
and
EndValue
arguments for each maneuver, the program below uses
arguments, and the
' Ramp down from full speed backwards
FOR pulseCount = 100 TO 1
NEXT
PULSOUT 13, 750 - pulseCount
PULSOUT 12, 750 + pulseCount
PAUSE 20
PULSOUT Duration
arguments.
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: