'{$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