28125 Parallax Inc, 28125 Datasheet - Page 197
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: 197 of 360
- Download datasheet (5Mb)
There is an example of nested
alternate whisker contacts in the next program.
Example Program: EscapingCorners.bs2
This program will cause your Boe-Bot to execute a U-turn at either the fourth or fifth
alternate corner, depending on which whisker was pressed first.
' -----[ Title ]--------------------------------------------------------------
' Robotics with the Boe-Bot - EscapingCorners.bs2
' Boe-Bot navigates out of corners by detecting alternating whisker presses.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
' -----[ Variables ]----------------------------------------------------------
pulseCount
counter
old7
old5
' -----[ Initialization ]-----------------------------------------------------
FREQOUT 4, 2000, 3000
counter = 1
old7 = 0
old5 = 1
' -----[ Main Routine ]-------------------------------------------------------
√
√
ENDIF
Enter, save, and run EscapingCorners.bs2.
Test this program by pressing alternate whiskers as the Boe-Bot roams.
Depending on which Whisker you started with, the Boe-Bot should execute its
U-Turn maneuver after either the fourth or fifth consecutive whisker press.
ELSE
ENDIF
ELSE
Commands for both condition2 and condition1
Commands for condition1 but not condition2
Commands for not condition1
VAR
VAR
VAR
VAR
Byte
Nib
Bit
Bit
IF…THEN
statements in the routine that detects consecutive
' Stamp directive.
' PBASIC directive.
' FOR...NEXT loop counter.
' Counts alternate contacts.
' Stores previous IN7.
' Stores previous IN5.
' Signal program start/reset.
' Start alternate corner count.
' Make up old values.
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: