-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JAMES_BOND.ino
46 lines (39 loc) · 1.38 KB
/
JAMES_BOND.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "pitches.h"
int melody[] =
{
NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,
NOTE_B3,NOTE_G3,NOTE_C4,NOTE_G3,NOTE_CS4,NOTE_G3,NOTE_C4,NOTE_G3,NOTE_B3,NOTE_G3,NOTE_C4,NOTE_G3,NOTE_CS4,NOTE_G3,NOTE_C4,NOTE_G3,
NOTE_E4,NOTE_F4,NOTE_F4,NOTE_F4,NOTE_F4,NOTE_E4,NOTE_E4,NOTE_E4,
NOTE_E4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_E4,NOTE_E4,NOTE_E4,NOTE_E4,NOTE_F4,NOTE_F4,NOTE_F4,NOTE_F4,NOTE_E4,NOTE_E4,NOTE_E4,
NOTE_E4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_E4,NOTE_E4,NOTE_E4,
NOTE_E4,NOTE_F4,NOTE_F4,NOTE_F4,NOTE_F4,NOTE_E4,NOTE_E4,NOTE_E4,
NOTE_E4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_E4,NOTE_E4,NOTE_E4,
NOTE_DS5,NOTE_D5,NOTE_B4,NOTE_A4,NOTE_B4,
NOTE_E4,NOTE_G4,NOTE_DS5,NOTE_D5,NOTE_G4,NOTE_B4,
NOTE_B4,NOTE_FS5,NOTE_F5,NOTE_B4,NOTE_D5,NOTE_AS5,
NOTE_A5,NOTE_F5,NOTE_A5,NOTE_DS6,NOTE_D6
};
int noteDurations[] = {
8,8,2,8,8,2,16,8,16,8,8,
2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,
8,16,16,8,4,8,8,8,
8,16,16,8,4,8,8,8,8,
16,16,8,4,8,8,8,
8,16,16,8,4,8,8,8,
8,16,16,8,4,8,8,8,
8,16,16,8,4,8,8,8,
8,2,8,8,1,
8,4,8,4,8,8,
8,8,4,8,4,8,
4,8,4,8,3
};
void setup() {
for (int thisNote = 0; thisNote < 100; thisNote++) {
int noteDuration = 1000 / noteDurations[thisNote];
tone(13, melody[thisNote], noteDuration);
int pauseBetweenNotes = noteDuration * 1;
delay(pauseBetweenNotes);
noTone(13);
}
}
void loop() { }