Reference.Tone History

Hide minor edits - Show changes to markup

September 28, 2010, at 10:22 AM by Equipo Traduccion -
Added lines 24-25:

NOTA: las frecuencias audibles por el oído humano van de los 20Hz a los 20KHz por lo que el parámetro "frecuencia" debería estar comprendido entre estos dos valores.

Deleted line 36:
September 28, 2010, at 10:16 AM by Equipo Traduccion -
June 05, 2010, at 12:07 AM by Equipo Traduccion -
Changed lines 6-28 from:

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.

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.

Use of the tone() function will interfere with PWM output on pins 3 and 11 (on boards other than the Mega).

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.

Syntax

tone(pin, frequency)
tone(pin, frequency, duration)

Parameters

pin: the pin on which to generate the tone

frequency: the frequency of the tone in hertz

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

Returns

nothing

See also

to:

Sólo puede generarse un tono cada vez. Si un tono está sonando en un pin diferente, la llamada a tone() no tendrá efecto. Si el tono está sonando en el mismo pin, la llamada establecerá la nueva frecuencia.

El uso de la función tone() interferirá con la salida PWM en los ins 3 y 11 (en otras placas distintas de la Mega).

NOTA: si quieres hacer sonar diferentes tonos en múltiples pins necesitas llamar a noTone() en un pin antes de llamar a tone() en el siguiente pin.

Sintáxis

tone(pin, frecuencia)
tone(pin, frecuencia, duracion)

Parámetros

pin: el pin en el que generar el tono

frecuencia: la frecuencia del tono en hercios.

duracion: la duración del tono en milisegundos (opcional)

Retorno

Ninguno

Ver también

June 04, 2010, at 11:59 PM by Equipo Traduccion -
Changed lines 3-5 from:

Description

to:

Descripción

Genera una onda cuadrada de la frecuencia especificada (y un 50% de ciclo de trabajo) en un pin. La duración puede ser especificada, en caso contrario la onda continua hasta que haya una llamada a noTone(). El pin puede conectarse a un zumbador piezoeléctrico u otro altavoz que haga sonar los tonos.

March 08, 2010, at 04:56 PM by Tom Igoe -
Changed lines 32-33 from:
to:
March 08, 2010, at 04:56 PM by Tom Igoe -
Changed lines 32-33 from:
to:
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:
to:
February 09, 2010, at 01:55 PM by Tom Igoe -
Added lines 25-28:
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

Share