28029 Parallax Inc, 28029 Datasheet - Page 102
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: 102 of 340
- Download datasheet (5Mb)
Page 90 · Smart Sensors and Applications
' Smart Sensors and Applications - TestAtn.bs2
' Test BASIC Stamp arctangent calculations.
'{$STAMP BS2}
'{$PBASIC 2.5}
angle
x
y
DO
LOOP
Your Turn - Testing Brad to Degree Conversion
As mentioned earlier, the ideal integer result comes from calculating angle
(360/256) x angle
is 5 to 9 or down if it is 1 to 4. You can generate a list of all 256 brad to degree
conversions with this program.
' Smart Sensors and Applications - BradsToDegrees.bs2
' Display brad to degree conversions for */ 360 and */ 361.
'{$STAMP BS2}
'{$PBASIC 2.5}
DEBUG "Enter y: "
DEBUGIN SDEC y
DEBUG "Enter x: "
DEBUGIN SDEC x
angle = x ATN y
DEBUG "brad ", SDEC ? angle
angle = angle */ 361
DEBUG "degree ", SDEC ? angle, CR
Some values will be lower than you predict. For example, when h = 100 and θ = 30°,
y = 50 and x = 87. The Debug Terminal will display 21 for the brad angle, which is correct,
but 29 for the degree angle is not correct. It should be 30. This happens occasionally when
scaling from a smaller range to a larger range. The 21 brads measurement corresponds to
29° and 22 brads corresponds to 31°.
VAR
VAR
VAR
brands
and then rounding up if the value to the right of the decimal point
Word
Word
Word
degrees
=
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: