27220 Parallax Inc, 27220 Datasheet - Page 120
27220
Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet
1.27220.pdf
(230 pages)
Specifications of 27220
Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
- Current page: 120 of 230
- Download datasheet (3Mb)
' -----[ Constants ]-------------------------------------------------------
TAdj
FAdj
Threshold
NoteTm
' -----[ Variables ]-------------------------------------------------------
tone
' -----[ Program Code ]----------------------------------------------------
Main:
Behind the Scenes
A Theremin is an interesting musical device used to create those weird, haunting
sounds often heard in old horror movies. This version uses the light falling onto a
photocell to create the output tone.
Since the photocell is a resistive device, RCTIME can be used to read its value.
FREQOUT is used to play the note. The constant, Threshold, is used to control the
cutoff point of the Theremin. When the photocell reading falls below this value, no
sound is played. This value should be adjusted to the point where the Theremin
stops playing when the photocell is not covered in ambient light.
Behind the Scenes…Going Deeper
You may wonder how the BASIC Stamp is able to create a musical note using a pure
digital output. The truth is that it gets a little help from the outside world. At the
DO
LOOP
HIGH PitchCtrl
PAUSE 1
RCTIME PitchCtrl, 1, tone
tone = tone */ FAdj
IF (tone > Threshold) THEN
ENDIF
FREQOUT Speaker, NoteTm */ TAdj, tone
CON
CON
CON
CON
VAR
$100
$100
200
40
Word
' time adjust factor
' frequency adjust factor
' cutoff frequency to play
' note timing
' frequency output
' discharge cap
' for 1 ms
' read the light sensor
' scale input
' play?
Related parts for 27220
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: