Table of Contents

Sound


Beep() uses any pin to generate a tone.

  • Beep(pin, frequency, duration) - Creates a tone for a specified duration on any pin
    pin: Pin number, 'p' used with on-board piezo buzzer
    frequency: The frequency in Hz, max value is 10KHz
    duration: The duration of the beep in milliseconds, max value is 1000ms

This example code will generate beep on pin 0 and on-board piezo buzzer at frequency 256Hz for one second.

duelink.Sound.Beep(0, 256, 1000)

duelink.Sound.Beep('p', 256, 1000)
Note

This feature is blocking, so the rest of your code will stop until Beep() is completed.