HOME

 
Basic Stamp 2
workshop
 

HARDWARE


SOFTWARE


EXAMPLES


EXTERNAL LINKS


 

Simple Theremin
controlled by a photoresistor

Schema of the circuit

Code

'{$STAMP BS2}

' Variables
tone VAR Word ' frequency output

' Program Code
Main:
HIGH 0 ' discharge cap
PAUSE 1 ' for 1 ms
RCTIME 0, 1, tone ' read the light sensor

tone = tone - 1000 ' adjust the value
FREQOUT 5, 100, tone ' output the tone for 1/10 of a second
GOTO Main

 

top of page

vincent leclerc . v@uttermatter.com . 11-19-2003
sharerights extended to all
i am not responsible for any problems caused by suggestions made in this workshop