Arduino Toolkit - @arduino/playTone
- : playTone
(ar, pin, freq, duration)
Play a tone of a given frequency on a specified pin.
Inputs
ar - connected arduino object
pin - digital pin to play tone on
freq - frequency in hertz to play between 0 and 32767Hz.
duration duration in seconds to play tone between 0 and 30 seconds
If duration is 0 or not specified, tone will continue to play until next tone is commanded. If frequency is 0, tone will stop playing
NOTE: use of playTone can interfere with PWM output.