Reference for Wiring version 0027+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name |
noTone() |
Examples |
void setup() {
// sets digital pin 0 as input to connect a switch
pinMode(0, INPUT);
// generates a tone of 400Hz on output pin 3
// with infinite duration
tone(3, 400, -1);
}
void loop() {
// if the switch is pressed stop the tone on pin 3
if(digitalRead(0) == HIGH) {
noTone(3);
}
} |
Description |
The noTone() method stops the tone generation in the specified output pin. |
Syntax |
noTone(pin) |
Parameters |
pin |
int: the output pin number to stop generating tone |
|
Returns |
None |
Usage |
Application |
Related |
tone()
|
Updated on September 16, 2010 10:41:39pm PDT