27297 Parallax Inc, 27297 Datasheet - Page 64
27297
Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet
1.27297.pdf
(230 pages)
Specifications of 27297
Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 64 of 230
- Download datasheet (3Mb)
ModeB:
ModeC:
ModeD:
ModeE:
Behind the Scenes
Overall, this program is simpler than it first appears. The main body of the program
is a loop. Timing through the main loop is controlled by the position of the
potentiometer. RCTIME is used to read the pot and during development the
maximum pot reading was found to be 695, and the minimum reading was 10. What
we’d like to do is convert the span 10 – 695 to 50 – 1000.
The process is actually quite simple: the desired output span (950) is divided by the
input span (685) to provide a scale factor of 1.3868. This factor is converted for use
with */ by multiplying by 256 (355 or $0163). In application the low end pot value
is subtracted from the raw input, the scale factor applied, and then the minimum
output value of 50 is added. Those with a flair for mathematics will recognize the
familiar
The code at Switch_Check looks to see if the button is pressed. If it is, the
variable, mode, is incremented (increased by 1). The modulus (//) operator is used
to keep mode in the range of zero to four. This works because the modulus operator
returns the remainder of an integer division. Since any number divided by itself will
READ (SeqA + offset), Lights
RETURN
offset = offset + 1 // BMax
READ (SeqB + offset), Lights
RETURN
offset = offset + 1 // CMax
READ (SeqC + offset), Lights
RETURN
offset = offset + 1 // DMax
READ (SeqD + offset), Lights
RETURN
RANDOM rndVal
Lights = rndVal & %00111111
RETURN
y = mx+b
equation.
' output new light pattern
' get random number
' light random channels
Related parts for 27297
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: