source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/examples/02.Digital/toneMultiple/toneMultiple.ino @ 4837

Last change on this file since 4837 was 4837, checked in by daduve, 2 years ago

Adding new version

File size: 717 bytes
Line 
1/*
2  Multiple tone player
3
4 Plays multiple tones on multiple pins in sequence
5
6 circuit:
7 * 3 8-ohm speaker on digital pins 6, 7, and 8
8
9 created 8 March 2010
10 by Tom Igoe
11 based on a snippet from Greg Borenstein
12
13This example code is in the public domain.
14
15 http://www.arduino.cc/en/Tutorial/Tone4
16
17 */
18
19void setup() {
20
21}
22
23void loop() {
24  // turn off tone function for pin 8:
25  noTone(8);
26  // play a note on pin 6 for 200 ms:
27  tone(6, 440, 200);
28  delay(200);
29
30  // turn off tone function for pin 6:
31  noTone(6);
32  // play a note on pin 7 for 500 ms:
33  tone(7, 494, 500);
34  delay(500);
35
36  // turn off tone function for pin 7:
37  noTone(7);
38  // play a note on pin 8 for 500 ms:
39  tone(8, 523, 300);
40  delay(300);
41}
Note: See TracBrowser for help on using the repository browser.