28029 Parallax Inc, 28029 Datasheet - Page 187

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
You can use a standard algebra technique, solving two equations in two unknowns, to
figure out the statements you will need to transform Cartesian coordinates into display
coordinates for the Debug Terminal. This next example shows how it was done for the
statements that converted x and y from Cartesian to display coordinates in
PlotXYGraph.bs2.
By adding a couple of
and after versions of the X-value you entered.
Save PlotXyGraph.bs2 under another name, like PlotXyGraphBeforeAfter.bs2.
Add the two
Add two more
Enter the coordinates (3,1) and (-2,-2) into the Debug Terminal's Transmit
windowpane. See Figure 5-5.
Record the After values in Table 5-1.
DEBUG "Type X coordinate: "
DEBUGIN SDEC1 x
DEBUG CR, "Type Y coordinate: "
DEBUGIN SDEC1 y
DEBUG CRSRXY, 0, 12, "x before: ", SDEC x
x = (x * 2) + 6
y = 3 - y
DEBUG CRSRXY, 0, 14, "x after:
DEBUG CRSRXY, x, y, "*"
DEBUG
DEBUG
DEBUG
Coordinates
(-2, -2)
Table 5-1:
(3, 1)
commands that display the "before" and "after" values of x.
commands to PlotXYGraph.bs2, you can display the before
commands to display the “before” and “after” values of y.
X Values Before and After
Before
-2
3
Chapter 5: Accelerometer Gaming Basics · Page 175
", SDEC x
After
' <--- Add
' <--- Add

Related parts for 28029