122-28029 Parallax Inc, 122-28029 Datasheet - Page 180

GUIDE STUDENT SMART SENSORS

122-28029

Manufacturer Part Number
122-28029
Description
GUIDE STUDENT SMART SENSORS
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-28029

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Smart Sensors
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Page 168 · Smart Sensors and Applications
ACTIVITY #1: PBASIC GRAPHIC CHARACTER DISPLAY
This activity introduces some programming techniques you will use to graphically
display coordinates with the Debug Terminal.
introduced in this activity and the next will be familiar from the previous Accelerometer
and LCD chapters.
The CRSRXY and Other Control Characters
The
specific location on the Debug Terminal's Receive windowpane. For example,
CRSRXY, 7, 3, "*"
characters down. Instead of using constants like 7 and 3, you can use variables to make
the placement of the cursor adjustable. Let’s say you have two variables named
The values these variables store can control the placement of the asterisk in the command
DEBUG CRSRXY, x, y, "*"
The next example program also makes use of the
DEBUG CLRDN
Example Program – CrsrxyPlot.bs2
With this program, you can type pairs of digits into the Transmit windowpane as in
Figure 5-2, to position asterisks on the Receive windowpane. Simply click the Transmit
windowpane and start typing. The first digit you type is the number of spaces to the right
to place the cursor, and the second number is the number of carriage returns downward.
Before typing a new pair of digits, press the space bar once.
DEBUG
Activity #4: Game Control – You are now ready to use tilt to start controlling
your game character. The background characters can be used to make decisions
about whether your game character is in or out of bounds. Have fun customizing
and expanding this tilt-controlled video game.
More Control Characters
You can find out more about control characters by looking up the
in the PBASIC Syntax Guide or the BASIC Stamp Manual. You can get to the PBASIC
Syntax Guide through your BASIC Stamp Editor (v2.0 or newer). Just click Help and select
Index. The BASIC Stamp Manual is available for download from www.parallax.com.
command's
causes all the lines below the cursor’s current location to be erased.
places the asterisk character seven spaces to the right and three
CRSRXY
.
control character can be used to place the cursor at a
CLRDN
Certain elements of the techniques
control character. The command
DEBUG
command, either
x
DEBUG
and
y
.

Related parts for 122-28029