pub fn tone(frequency: f32, duration: i32) -> Ev3Result<Child>
Expand description
Play tone sequence. The tone_sequence parameter is a list of tuples, where each tuple contains up to three numbers. The first number is frequency in Hz, the second is duration in milliseconds, and the third is delay in milliseconds between this and the next tone in the sequence.
ยงExample
use ev3dev_lang_rust::sound;
sound::tone(466.0, 500)?.wait()?;