28029 Parallax Inc, 28029 Datasheet - Page 195

KIT PARTS SMART SENSORS W/TEXT

28029

Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28029

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® or Javelin Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
28029PAR
Here’s a third step you can use to test and verify that it works:
Re-Drawing the Background
Up to this point, all of our plots accumulated asterisks as we entered more values in the
Transmit windowpane. The net effect we want for game control is to make the asterisk
disappear from its old location and appear in its new location whenever we redefine it, to
give the appearance of one asterisk moving.
(3) Add
DO
DEBUG CRSRXY, x, y, "*"
Start with the original, unmodified version of PlotXYGraph.bs2, save it under
the name PlotXYGraphRecall.bs2, and try the modifications just discussed in
steps (1) through (3) above. Keep in mind that both values displayed will be in
terms of Debug Terminal coordinates. Also keep in mind that the first time
through, the old coordinates will be (0, 0) since all variables initialize to zero in
PBASIC.
Why are
When working with signed values, word variables store both the value and the sign.
At the particular place that
values that range from 0 to 12, so all we need are nibble variables.
DEBUG
xOld = x
yOld = y
DEBUG "Type X coordinate: "
DEBUG CRSRXY, 0, 10,
DEBUG CRSRXY, 0, 11,
DEBUG CRSRXY, 0, 12, "Press any Key..."
DEBUGIN temp
statements to display the current and previous values of x, y.
"Current entry:
DEC x, ",", DEC y, ")"
"Previous entry: (",
DEC xOld, ",", DEC yOld, ")"
x
and
y
words while
xOld
(",
xOld
and
and
yOld
Chapter 5: Accelerometer Gaming Basics · Page 183
yOld
are used in the program, they are only storing
are nibbles?
' <--- Add
' <--- Add
' <--- Add
' <--- Add
' <--- Modify

Related parts for 28029