27403 Parallax Inc, 27403 Datasheet - Page 69
27403
Manufacturer Part Number
27403
Description
GUIDE APP ROBOTCS W/SUMOBOT V1.0
Manufacturer
Parallax Inc
Datasheet
1.27404.pdf
(266 pages)
Specifications of 27403
Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
- Current page: 69 of 266
- Download datasheet (6Mb)
ACTIVITY #5: PUSHBUTTON PROGRAM MODE SELECTION
In some competitions, changing strategy between sumo rounds could make a big
difference in your SumoBot's standing. This activity introduces a simple technique you
can use to select the SumoBot's mode of operation based on cues from the speaker.
Selecting the Mode
In the next example program, you can enter a mode selection by pressing and holding the
pushbutton while you press and release the Reset button. After releasing the Reset
button, the program will beep once, then twice, then three times, and so on up to five
times. To select mode one, let go of the pushbutton after the speaker has beeped once.
To select mode two, keep holding the pushbutton, and instead let go after the speaker has
beeped twice. For mode three, wait for three beeps before letting go, and so on.
This program uses an EEPROM byte with a different
is another value that is initialized to zero when the program is downloaded, but
commands will change this value during run-time.
This
pressed. If it is, the
moves on to the next command.
The
uses the
first time through the outer loop,
inner loop is followed by a 1-second
the pushbutton. If the pushbutton has been released, the
value 1 stored by
If the pushbutton has not yet been released, the outer loop repeats. The second time
through the
another 1 second
Mode_Select
IF...THEN
' -----[ EEPROM Data ]-------------------------------------------------
ModeSelect
' -----[ Initialization ]----------------------------------------------
IF pbSense = 1 THEN GOSUB Mode_Select ' Call Mode_Select subroutine
temp
FOR...NEXT
variable to count from 1 to 5. The inner loop counts from 1 to
temp
statement in the Initialization routine checks to see if the pushbutton is
PAUSE
subroutine uses a pair of nested
Mode_Select
to the
, the outer loop again checks the pushbutton. If the pushbutton
loop,
DATA
ModeSelect
temp
temp
0
subroutine gets called. Otherwise, the program just
PAUSE
will be 2. So, the inner loop beeps twice. After
is 1, so the inner loop beeps the speaker once. The
EEPROM byte and exits the outer loop.
, after which, an
' Program select byte
FOR...NEXT
Symbol
IF...THEN
IF...THEN
name -
loops. The outer loop
statement writes the
ModeSelect
statement checks
temp
. This
WRITE
. The
Related parts for 27403
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: