28029 Parallax Inc, 28029 Datasheet - Page 129
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: 129 of 340
- Download datasheet (5Mb)
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP
PULSIN 6, 1, x
PULSIN 7, 1, y
' Scale and offset x and y-axis values to -127 to 127.
x = (x MIN 1875 MAX 3125) - 1875 ** 13369 - 127
y = (y MIN 1875 MAX 3125) - 1875 ** 13369 - 127
' Calculate and display Arcsine of x-axis measurement.
side = x
GOSUB Arcsine
DEBUG HOME, "x tilt angle = ", CLREOL, SDEC3 angle, CR
IF ABS(angle) > 10 THEN
ELSE
ENDIF
' Calculate and display Arcsine of y-axis measurement.
side = y
GOSUB Arcsine
DEBUG CRSRXY, 0, 1, "y tilt angle = ", CLREOL, SDEC3 angle
IF ABS(angle) > 10 THEN
ELSE
ENDIF
PAUSE 100
P2. Example solution: Below is a modified main routine from HorizontalTilt.bs2
DEBUG CRSRXY, 0, 2, "Warning! Check x-axis!"
DEBUG CRSRXY, 0, 2, CLREOL
DEBUG CRSRXY, 0, 3, "Warning! Check y-axis!"
DEBUG CRSRXY, 0, 3, CLREOL
Chapter 3: Tilt with the Memsic Accelerometer · Page 117
' x-axis measurement
' y-axis measurement
' Pause 1/10 second
' Repeat DO...LOOP
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: