28029 Parallax Inc, 28029 Datasheet - Page 113

KIT PARTS SMART SENSORS W/TEXT

28029

Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet

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
Figure 3-29 shows the BASIC Stamp version of a unit circle for its
operators. Instead of results that range from −1 to 1, the results for
from −127 to 127. Angles for the
instead of 45°, use 32 brads. Instead of 90°, use 64 brads, and so on. To convert from
brads to degrees with a calculator, multiply the number of brads by 360/256. To convert
from degrees to brads, use 256/360.
Example Program: SineCosine.bs2
This example program displays the BASIC Stamp integer calculations for sine and
cosine. You can divide these values by 127 to get an approximation of the actual sine or
cosine values. It converts degrees to brads with
ScaleConstant equation from Activity #3.
' Smart Sensors and Applications - SineCosine.bs2
' Display BASIC Stamp sine and cosine values.
' {$STAMP BS2}
' {$PBASIC 2.5}
degrees VAR Word
brads VAR Word
Enter, save and run SineCosine.bs2
Compare the results (divided by 127) to calculated values of sine and cosine.
SIN
Chapter 3: Tilt with the Memsic Accelerometer · Page 101
and
COS
** 46733
operators are in terms of brads. So,
, which was derived using the
Figure 3-29
BASIC Stamp Unit
Circle Sine and
Cosine Operators
SIN
and
SIN
COS
and
range
COS

Related parts for 28029