28029 Parallax Inc, 28029 Datasheet - Page 203

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
Tilt Control of Asterisk Display
BubbleGraph.bs2 updates the position of the hottest spot inside the accelerometer
chamber about 8 times per second (8 Hz). After displaying the background (X and Y
axes) to the Debug Terminal, it repeats the same steps over and over again.
Each of these steps is discussed in more detail in the section that follows the example
program.
Example Program – BubbleGraph.bs2
' -----[ Title ]--------------------------------------------------------------
' Smart Sensors and Applications - BubbleGraph.bs2
' Position of bubble in tilt sensor displays on graph in Debug Terminal
'{$STAMP BS2}
'{$PBASIC 2.5}
' -----[ EEPROM Data ]--------------------------------------------------------
' Store background to EEPROM
DATA CLS,
"
"
"
"
"
"----------+--------->", CR,
"-5-4-3-2-1| 1 2 3 4 5", CR,
"
"
"
"
Replace the asterisk with the background character and pause for the blink-
effect.
Get the X-axis tilt from the accelerometer.
Get the Y-axis tilt from the accelerometer.
Adjust the value so that it fits on the plot’s X-axis.
Adjust the value so that it fits on the plot’s Y-axis.
Display the asterisk and pause again for the blink-effect.
Enter and run BubbleGraph.bs2.
-2|
-3|
-4|
-5|
5^Y
4|
3|
2|
1|
X", CR,
", CR,
", CR,
", CR,
", CR,
", CR,
", CR,
", CR,
", CR
Chapter 5: Accelerometer Gaming Basics · Page 191
' Stamp/PBASIC directives
' Address of last char on row
'
'
'
'
'
' 110
' 132
' 154
' 176
' 198
' 220
' 242
22
44
66
88
0

Related parts for 28029