2011_ACTIVITY #2 - ACTION SOUNDS

2011_ACTIVITY #2 - ACTION SOUNDS - PAUSE 500 DEBUG...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
' What's a Microcontroller - ActionTones.bs2 ' Demonstrate how different combinations of pause, duration, and frequency ' can be used to make sound effects. ' '{$STAMP BS2} '{$PBASIC 2.5} ' duration VAR Word frequency VAR Word f DEBUG "Alarm. ..", CR PAUSE 100 FREQOUT 9, 500, 1500 PAUSE 500 FREQOUT 9, 500, 1500 PAUSE 500 FREQOUT 9, 500, 1500 PAUSE 500 FREQOUT 9, 500, 1500
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PAUSE 500 DEBUG "Robot reply. ..", CR PAUSE 100 FREQOUT 9, 100, 2800 FREQOUT 9, 200, 2400 FREQOUT 9, 140, 4200 FREQOUT 9, 30, 2000 PAUSE 500 DEBUG "Hyperspace. ..", CR PAUSE 100 FOR duration = 15 TO 1 STEP 1 FOR frequency = 2000 TO 2500 STEP 20 FREQOUT 9, duration, frequency NEXT NEXT DEBUG "Done", CR D END...
View Full Document

This note was uploaded on 01/10/2011 for the course EE 1244 taught by Professor Drera during the Fall '10 term at Conestoga.

Ask a homework question - tutors are online