1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-14 11:29:26 +01:00
This commit is contained in:
Fede85 2013-05-23 16:24:38 +02:00
parent ec7996e8be
commit 5481bacba2

View File

@ -4,7 +4,7 @@
Plays multiple tones on multiple pins in sequence Plays multiple tones on multiple pins in sequence
circuit: circuit:
* 3 8-ohm speaker on digital pins 6, 7, and 11 * 3 8-ohm speaker on digital pins 6, 7, and 8
created 8 March 2010 created 8 March 2010
by Tom Igoe by Tom Igoe
@ -21,8 +21,8 @@ void setup() {
} }
void loop() { void loop() {
// turn off tone function for pin 11: // turn off tone function for pin 8:
noTone(11); noTone(8);
// play a note on pin 6 for 200 ms: // play a note on pin 6 for 200 ms:
tone(6, 440, 200); tone(6, 440, 200);
delay(200); delay(200);
@ -35,8 +35,7 @@ void loop() {
// turn off tone function for pin 7: // turn off tone function for pin 7:
noTone(7); noTone(7);
// play a note on pin 11 for 500 ms: // play a note on pin 8 for 500 ms:
tone(11, 523, 300); tone(8, 523, 300);
delay(300); delay(300);
} }