playTone(frequency, duration, pause [, flags [, freqIncr [, volume]]])
Play a tone
Supported targets: BW, COLOR
Status: current Introduced in 2.1.0, changed in 2.10
Parameters
frequency
(number) tone frequency in Hz (from 150 to 15000)duration
(number) length of the tone in millisecondspause
(number) length of the silence after the tone in millisecondsflags
(number):0 or not present
play with normal priority.PLAY_BACKGROUND
play in background (built in vario function uses this context)PLAY_NOW
play immediately
freqIncr
(number) positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change isfreqIncr * 10Hz
. The valid range is from -127 to 127.volume
(number): (1..5) override radio settings Beep volume for the duration of file. Omitting the parameter uses radio settings Beep volume
Return value
none
Examples
Last updated