28029 Parallax Inc, 28029 Datasheet - Page 159
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: 159 of 340
- Download datasheet (5Mb)
DO
LOOP
' -----[ Subroutine - Compass_Get_Axes ]--------------------------------------
Compass_Get_Axes:
GOSUB Compass_Get_Axes
angle = x ATN -y
angle = angle */ 361
DEBUG HOME, "x-axis N(-S) = ",SDEC x,
PAUSE 150
xSum = 0
ySum = 0
FOR mCount = 1 TO 10
NEXT
sign = xSum.BIT15
HIGH En: LOW En
SHIFTOUT DinDout,clk,MSBFIRST,[Reset\4]
HIGH En: LOW En
SHIFTOUT DinDout,clk,MSBFIRST,[Measure\4]
status = 0
DO
LOOP UNTIL status = Ready
SHIFTIN
HIGH En
IF (y.BIT10 = 1) THEN y = y | NegMask
IF (x.BIT10 = 1) THEN x = x | NegMask
xSum = xSum + x
ySum = ySum + y
HIGH En: LOW En
SHIFTOUT DinDout,clk,MSBFIRST,[Report\4]
SHIFTIN
CLREOL, CR, "y-axis W(-E) = ",
SDEC y, CLREOL, CR, CR, "angle = ",
DEC angle, " degrees", CLREOL
DinDout,clk,MSBPOST,[x\11,y\11]
DinDout,clk,MSBPOST,[Status\4]
Chapter 4: Hitachi HM55B Compass Module · Page 147
' Main loop
' Get x, and y values
' Convert x and y to brads
' Convert brads to degrees
' Display axes and degrees
' Debug delay for slower PCs
' Repeat main loop
' Compass module subroutine
' Accumulators to zero
' Take ten measurements
' Send reset command to HM55B
' HM55B start measurement cmd
' Clear previous status flags
' Status flag checking loop
' Measurement status command
' Get Status
' Status ready? Exit loop
' Get x & y axis values
' Disable module
' Store 11-bits as signed word
' Repeat for other axis
' Keep a running sum of x
' Keep a running sum of y
' Store sign of xSum
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: