Command: |
SPEAKER i [TO] frequency [[TIME] seconds]
|
---|---|
Command Syntax: |
SET SPEAKER i [TO] frequency [[TIME] seconds] |
Range: |
|
Describe: |
Same as SOUND above, except sound is played on an external speaker attached to a digital output pin, available on any IN/OUT port, or the breadboard connector port. Note: On-board SOUND and external SPEAKER cannot be used concurrently. |
Result: |
Play tone with frequency given, optional duration in milliseconds, default = 1 second. |
Type or |
Control |
|
||||||
SET SOUND 440 TEMPO 2 TIME 2
|
||||||
|
Code |
SET SOUND 440 TEMPO 2 TIME 5 SET SPEAKER 1 880 TEMPO 3 TIME 4 |
|
SET SOUND 400 TIME 5 TEMPO 0 is equivalent to SET SOUND 400 TIME 5 Both commands will play the tone for 5 seconds without any breaks. |