This shows you the differences between two versions of the page.
arduino:advanced_io:tone [2013/02/15 18:10] 127.0.0.1 external edit |
arduino:advanced_io:tone [2013/02/15 20:45] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
====Description ==== | ====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 [[arduino:advanced io:NoTone]](). The pin can be connected to a piezo buzzer or other speaker to play tones. | + | 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 [[arduino:advanced io: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. | 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. | ||
Line 25: | Line 25: | ||
====See also ==== | ====See also ==== | ||
- | * [[arduino:advanced io:NoTone]]() | + | * [[arduino:advanced io:NoTone]] |
- | * [[arduino:analog io:AnalogWrite]]() | + | * [[arduino:analog io:AnalogWrite]] |
- | * [[Tutorial/Tone|Tutorial:Tone]] | + | |
- | * [[Tutorial/Tone2|Tutorial:Pitch follower]] | + | |
- | * [[Tutorial/Tone3|Tutorial:Simple Keyboard]] | + | |
- | * [[Tutorial/Tone4|Tutorial: multiple tones]] | + | |
- | + | ||
- | * [[Tutorial/PWM | Tutorial: PWM]] | + | |
Source: arduino.cc | Source: arduino.cc | ||