overlook77
05-04-2006, 08:24 AM
I have the StampWorks Kit with the professional development board and a BS2.· I am trying to learn the PBASIC language but am having trouble.· I want Button 0 to make a sound whenever you press it.· However, my code only plays the tone by itself once and the button does nothing.· Can someone correct my code?
' {$STAMP BS2}
WkSpace VAR Byte
Main:
····· BUTTON 8, 1, 0, 0, WkSpace, 1, PlayTone
· PlayTone:
··· FREQOUT 7, 250, 3000
' {$STAMP BS2}
WkSpace VAR Byte
Main:
····· BUTTON 8, 1, 0, 0, WkSpace, 1, PlayTone
· PlayTone:
··· FREQOUT 7, 250, 3000