Reference.Tone History

Hide minor edits - Show changes to output

November 13, 2013, at 12:39 PM by Scott Fitzgerald -
Changed lines 10-11 from:
It is not possible to generate tones lower than 31Hz. For technical details, see [https://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation#Ugly_Details | Brett Hagman's notes].
to:
It is not possible to generate tones lower than 31Hz. For technical details, see [[https://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation#Ugly_Details | Brett Hagman's notes]].
November 13, 2013, at 12:39 PM by Scott Fitzgerald -
Changed lines 10-11 from:
It is not possible to generate tones lower than 31Hz. For technical details, see [[https://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation#Ugly_Details | Brett Hagman's notes].
to:
It is not possible to generate tones lower than 31Hz. For technical details, see [https://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation#Ugly_Details | Brett Hagman's notes].
November 13, 2013, at 12:39 PM by Scott Fitzgerald -
Added lines 10-11:
It is not possible to generate tones lower than 31Hz. For technical details, see [[https://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation#Ugly_Details | Brett Hagman's notes].
Changed line 36 from:
* [[Tutorial/PWM | Tutorial: PWM]]
to:
* [[Tutorial/PWM | Tutorial: PWM]]
January 03, 2011, at 07:52 PM by David A. Mellis -
Changed lines 19-22 from:
frequency: the frequency of the tone in hertz

duration: the duration of the tone in milliseconds (optional)
to:
frequency: the frequency of the tone in hertz - ''unsigned int''

duration: the duration of the tone in milliseconds (optional) - ''unsigned long''
March 08, 2010, at 04:56 PM by Tom Igoe -
Changed lines 32-33 from:
* [[Tone4|Tutorial: multiple tones]]
to:
* [[Tutorial/Tone4|Tutorial: multiple tones]]
March 08, 2010, at 04:56 PM by Tom Igoe -
Changed lines 32-33 from:
to:
* [[Tone4|Tutorial: multiple tones]]
March 08, 2010, at 04:24 PM by Tom Igoe -
Added lines 10-11:
'''NOTE:''' if you want to play different pitches on multiple pins, you need to call noTone() on one pin before calling tone() on the next pin.
February 12, 2010, at 03:20 PM by David A. Mellis -
Added lines 8-9:
Use of the tone() function will interfere with PWM output on pins 3 and 11 (on boards other than the Mega).
February 09, 2010, at 01:56 PM by Tom Igoe -
Changed line 25 from:
* [[Tutorial/Tutorial:Tone]]
to:
* [[Tutorial/Tone|Tutorial:Tone]]
February 09, 2010, at 01:55 PM by Tom Igoe -
Added lines 25-28:
* [[Tutorial/Tutorial:Tone]]
* [[Tutorial/Tone2|Tutorial:Pitch follower]]
* [[Tutorial/Tone3|Tutorial:Simple Keyboard]]
February 09, 2010, at 01:54 PM by Tom Igoe -
January 09, 2010, at 05:51 PM by David A. Mellis -
Changed lines 6-7 from:
On most Arduino boards, only one tone can be generated at a time. If a tone is already playing on a different pin, the call to tone() will have no effect. If the tone is playing on the same pin, the call will set its frequency.
to:
Only one tone can be generated at a time. If a tone is already playing on a different pin, the call to tone() will have no effect. If the tone is playing on the same pin, the call will set its frequency.
January 09, 2010, at 05:39 PM by David A. Mellis -
Changed lines 15-16 from:
frequency: the frequency in hertz of the tone
to:
frequency: the frequency of the tone in hertz
January 09, 2010, at 05:39 PM by David A. Mellis -
Added lines 1-25:
!!tone()

!!!!Description
Generates a square wave of the specified frequency (and 50% duty cycle) on a pin. A duration can be specified, otherwise the wave continues until a call to [[noTone]](). The pin can be connected to a piezo buzzer or other speaker to play tones.

On most Arduino boards, only one tone can be generated at a time. If a tone is already playing on a different pin, the call to tone() will have no effect. If the tone is playing on the same pin, the call will set its frequency.

!!!!Syntax
tone(pin, frequency) \\
tone(pin, frequency, duration)

!!!!Parameters
pin: the pin on which to generate the tone

frequency: the frequency in hertz of the tone

duration: the duration of the tone in milliseconds (optional)

!!!!Returns
nothing

!!!!See also
* [[noTone]]()
* [[analogWrite]]()
* [[Tutorial/PWM | Tutorial: PWM]]

Share