102
CipherLab BASIC Programming Part I
This section describes the commands related to the buzzer or speaker.
Note: 8200 is equipped with a speaker instead of a buzzer.
BEEP
Purpose To specify a beep sequence of how a buzzer works.
Syntax BEEP(freq%, duration% {, freq%, duration%})
Remarks “freq%” is an integer variable, indicating the value of beep frequency (Hz).
freq%
≧ 0
Suggested frequency for the buzzer ranges from 1 kHz to
6 kHz.
If the value of the frequency is 0, the buzzer will
not sound during the time duration.
freq%
= -1
For 8400, the buzzer volume can be configured by setting
freq% to “-1” and duration% to 1~3.
For 8200, the buzzer volume can be configured by setting
freq% to “-1” and duration% to 0~3.
duration% Buzzer Volume
0 Set the volume level to “Mute”
1 Set the volume level to “Low”
2 Set the volume level to “Medium”
3 Set the volume level to “High”
freq%
= -2
For 8200, a .wav file on SD card can be specified b
setting freq% to “-2” and duration%
the example below.
“duration%”
is an integer variable, indicating the value of beep duration,
which is specified in units of 10 milliseconds.
Up to eight frequency-duration pairs can be assigned in a beep sequence.
Example
ON READER(1) GOSUB BcrDATA_1
...
BcrData_1:
BEEP(-1, 1) ' Set Low
BEEP(2000, 10, 0, 10, 2000, 10)
BEEP(-2, 1) ' Play A:\WAV\1.wav
...