122-28029 Parallax Inc, 122-28029 Datasheet - Page 102
122-28029
Manufacturer Part Number
122-28029
Description
GUIDE STUDENT SMART SENSORS
Manufacturer
Parallax Inc
Datasheet
1.122-28029.pdf
(340 pages)
Specifications of 122-28029
Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Smart Sensors
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
- 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 122-28029
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
MANUAL FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
GUIDE STUDENT PROCESS CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
MANUAL PROPELLER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
LEAD WIRES FLYING CABLE III/IV
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
BOARD ADAPTER AND FLY LEADS
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
PLATFORM CABLE USB II
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
KIT STARTER COOLRUNNER-II BUNDLE
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
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:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: