28029 Parallax Inc, 28029 Datasheet - Page 212

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
Page 200 · Smart Sensors and Applications
LOOP
How it Works – From BubbleGraph.bs2 to TiltObstacleGame.bs2
Two of the
backgrounds was given a Symbol name,
names make it easy for the program to select which background to display. The optional
@Address
BubbleGraph.bs2’s background, the first character is
problem with
' Measure tilt and calculate cursor position.
PULSIN 6, 1, x
PULSIN 7, 1, y
x = (x MIN 1875 MAX 3125) - 1875 ** 1101
y = (y MIN 1875 MAX 3125) - 1875 ** 576
y = 10 - y
' Display asterisk at new position.
DEBUG CRSRXY, x,
PAUSE 50
' Display score
DEBUG CRSRXY, 0, 11,
' Did you move the asterisk over a $, W, I, N, or #?
SELECT char
ENDSELECT
' This routine gets skipped while symbol is still = Maze.
' was changed to YouWin or YouLose, display new background and end game.
IF (symbol = YouWin) OR (symbol = YouLose) THEN
ENDIF
CASE "$"
CASE "#"
CASE "W", "I", "N"
FOR index = 0 TO 242
NEXT
END
points = points + 10
WRITE index, "%"
symbol = YouLose
symbol = YouWin
READ index + symbol, char
DEBUG char
"Score: ", DEC3 points
operator was also used to set each directive’s beginning EEPROM address. In
DATA
CLS
in these
directive’s optional features were used here. Each of the three
y, "*"
DATA
directives is that it erases the entire Debug Terminal,
Maze
,
YouWin
' Get Ax and Ay
' Calculate x position
' Calculate y position
' Display asterisk
' Pause again for blink effect
' Display points
' Check background character
' If "$"
' Add points
' Write "%" over "$"
' If "#", set Symbol to YouLose
' If W,I,orN, Symbol -> YouWin
' 242 characters
' Get character
' Display character
' Next iteration of loop
' End game
' End symbol-if code block
' Repeat main loop
, and
CLS
to clear the screen. The
YouLose
If symbol
. These Symbol

Related parts for 28029