28029 Parallax Inc, 28029 Datasheet - Page 99
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: 99 of 340
- Download datasheet (5Mb)
Converting from Brads to Degrees with
In the previous activity, we used the
to a smaller range. Converting from brads to degrees involves scaling a smaller scale of
0 to 255 to a larger scale of 0 to 359. The PBASIC
When you use a command like
ScaleConstant
by. For example, let's say you want to multiply
the result is 640. Now, if
be 25. If we want
The rules of integer math for scaling from one scale to another still apply, even though
we are converting from a smaller scale to a larger one. The only thing that will change is
the scale constant, which is a numerator of 256 for
The input scale is 0 to 255, which has 256 elements, and the output is 0 to 359, which has
360 elements. The result after substituting these values into the
equation is 361.
value = 640 */value
ScaleCons
*
*
*
*/
Remember
The
The
/
/
/
ScaleCons
ScaleCons
ScaleCons
ScaleCons
**
*/
operator multiplies by a number of 65536ths.
operator multiplies by a number of 256ths.
term is the number of 256ths you want to multiply the
value
tan
tan
t
tan
tan
tan
to equal 2.5 times
= .
value
2
t
t
t
t
=
5
=
=
=
361
×
Int
Int
Int
256
starts as 10, the result of
[
⎡
⎢
⎢
⎣
⎡
⎢
⎣
361
256
256
**
'multiply by 2.5
=
640
value
.
operator to scale values down from a larger range
⎛
⎜
⎜
⎝
⎛
⎜
⎝
412
input
256
Chapter 3: Tilt with the Memsic Accelerometer · Page 87
output
360
value
*/
]
−
scale
1
=
value
⎞
⎟
⎠
:
scale
⎤
⎥
⎦
*/
*/
ScaleConstant
, instead of 65536 for
elements
operator is designed for this job.
by 2.5. Multiply 2.5 by 256 and
elements
value = 640 */ value
−
1
⎞
⎟
⎟
⎠
⎤
⎥
⎥
⎦
*/
*/
value
scale constant
**
value
.
variable
, the
will
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: