28029 Parallax Inc, 28029 Datasheet - Page 120
28029
Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet
1.122-28029.pdf
(340 pages)
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
- Current page: 120 of 340
- Download datasheet (5Mb)
Page 108 · Smart Sensors and Applications
Example Program: HorizontalTilt.bs2
This example program displays your board's tilt in terms of degrees from horizontal.
' -----[ Title ]--------------------------------------------------------------
' Smart Sensors and Applications - HorizontalTilt.bs2
' Test arcsine for sine values from -127 to 127.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Constants ]----------------------------------------------------------
Negative
Positive
' -----[ Variables ]----------------------------------------------------------
x
y
side
angle
sign
' -----[ Initialization ]-----------------------------------------------------
DEBUG CLS
' -----[ Main Routine ]-------------------------------------------------------
DO
PULSIN 6, 1, x
√
√
LOOP
Enter, save and run HorizontalTilt.bs2.
Compare various tilt angles to the Debug Terminal's axis display.
side = x
GOSUB Arcsine
DEBUG HOME, "x tilt angle = ", CLREOL, SDEC3 angle, CR
side = y
GOSUB Arcsine
DEBUG "y tilt angle = ", CLREOL, SDEC3 angle
PAUSE 100
CON
CON
VAR
VAR
VAR
VAR
VAR
1
0
Word
Word
Word
Word
Bit
' BASIC Stamp Directive
' PBASIC Directive
' Sign - .bit15 of Word variables
' Memsic x-axis measurement
' Memsic y-axis measurement
' trig subroutine variable
' result angle - degrees
' Sign bit
' Clear Debug Terminal
' x-axis measurement
Related parts for 28029
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: