130-28029 Parallax Inc, 130-28029 Datasheet - Page 216
130-28029
Manufacturer Part Number
130-28029
Description
KIT PARTS SMART SENSORS
Manufacturer
Parallax Inc
Datasheet
1.122-28029.pdf
(340 pages)
Specifications of 130-28029
Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
- Current page: 216 of 340
- Download datasheet (5Mb)
Page 204 · Smart Sensors and Applications
If the player rapidly changes the board's tilt, it is possible to jump over the "
There are two ways to fix this. One would be to add jumping animation and call it a
"feature". Another way to fix it would be to only allow the asterisk to move by 1
character in either the X or Y directions. To fix this, the program will need to keep track
of the previous position. This is a job for the
Activity #2.
√
√
√
√
Add
TiltObstacleGameYourTurn.bs2:
x
y
xOld
yOld
Add initialization statements for
x
xOld = 10
y
yOld = 5
Modify the Main Routine so that
by an increment or decrement of 1. Repeat for
y = 10 - y
IF (x > xOld) THEN x = xOld MAX 19 + 1
IF (x < xOld) THEN x = xOld MIN 1 - 1
IF (y > yOld) THEN y = yOld MAX 9 + 1
IF (y < yOld) THEN y = yOld MIN 1 - 1
' Display asterisk at new position.
DEBUG CRSRXY, x,
PAUSE 50
xOld = x
yOld = y
' Display score
Run and test your modified program and verify that the asterisk can no longer
skip "
= 10
= 5
#
" walls.
these
VAR
VAR
VAR
VAR
variable
Word
Word
Word
Word
y, "*"
declarations
xOld
x
can only be greater than or less than
and
xOld
yOld
to
' x & y tilts & coordinates
' <--- Add
' <--- Add
' Start game char in middle
' <--- Add
' <--- Add
' Offset Cartesian -> Debug
' <--- Add
' <--- Add
' <--- Add
' <--- Add
' Display asterisk
' Pause again for blink effect
' <--- Add
' <--- Add
and
y
.
the
and
yOld
yOld
Variables
variables introduced in
.
section
#
" walls.
xOld
in
Related parts for 130-28029
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
KIT PROPELLER EDU PROJECT PARTS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
KIT PARTS PROCESS CONTROL
Manufacturer:
Parallax Inc
Datasheet:
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:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: