-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpeaker.ino
47 lines (41 loc) · 948 Bytes
/
Speaker.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
47
#include "pitches.h"
int speakerPin = 8;
void playActivateSE() {
tone(speakerPin, NOTE_A3, 1000/12);
delay(1000/12);
tone(speakerPin, NOTE_CS4, 1000/12);
delay(1000/12);
tone(speakerPin, NOTE_E4, 1000/12);
delay(1000/12);
tone(speakerPin, NOTE_A4, 1000/12);
delay(1000/12);
noTone(speakerPin);
}
void playDeactivateSE() {
tone(speakerPin, NOTE_A4, 1000/8);
delay(1000/8);
tone(speakerPin, NOTE_A3, 1000/8);
delay(1000/8);
noTone(speakerPin);
}
void playConnectSE() {
tone(speakerPin, NOTE_A3, 1000/8);
delay(1000/8);
tone(speakerPin, NOTE_E4, 1000/8);
delay(1000/8);
noTone(speakerPin);
}
void playAlertSE() {
tone(speakerPin, NOTE_E4, 1000/8);
delay(1000/8);
noTone(speakerPin);
}
void playCalibrationSE() {
tone(speakerPin, NOTE_CS4, 1000/8);
delay(1000/8);
tone(speakerPin, NOTE_A4, 1000/8);
delay(1000/8);
tone(speakerPin, NOTE_CS5, 1000/8);
delay(1000/8);
noTone(speakerPin);
}