Buzzer Control#
Sample API functions for playing tunes on a piezo buzzer.
See buzzer.h for source code.
Note Definitions#
Flats are used instead of sharps because # is a special character.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
A note which can be used in tune structure definitions.
Functions#
Plays a tune on the piezo buzzer.
Causes something to happen on a node (such as playing a tune on the buzzer) that can be used to indicate where it physically is.
Note Definitions Documentation#
NOTE_C3#
#define NOTE_C3Value:
119
A note which can be used in tune structure definitions.
32
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Db3#
#define NOTE_Db3Value:
112
A note which can be used in tune structure definitions.
33
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_D3#
#define NOTE_D3Value:
106
A note which can be used in tune structure definitions.
34
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Eb3#
#define NOTE_Eb3Value:
100
A note which can be used in tune structure definitions.
35
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_E3#
#define NOTE_E3Value:
94
A note which can be used in tune structure definitions.
36
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_F3#
#define NOTE_F3Value:
89
A note which can be used in tune structure definitions.
37
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Gb3#
#define NOTE_Gb3Value:
84
A note which can be used in tune structure definitions.
38
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_G3#
#define NOTE_G3Value:
79
A note which can be used in tune structure definitions.
39
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Ab3#
#define NOTE_Ab3Value:
74
A note which can be used in tune structure definitions.
40
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_A3#
#define NOTE_A3Value:
70
A note which can be used in tune structure definitions.
41
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Bb3#
#define NOTE_Bb3Value:
66
A note which can be used in tune structure definitions.
42
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_B3#
#define NOTE_B3Value:
63
A note which can be used in tune structure definitions.
43
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_C4#
#define NOTE_C4Value:
59
A note which can be used in tune structure definitions.
44
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Db4#
#define NOTE_Db4Value:
55
A note which can be used in tune structure definitions.
45
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_D4#
#define NOTE_D4Value:
52
A note which can be used in tune structure definitions.
46
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Eb4#
#define NOTE_Eb4Value:
49
A note which can be used in tune structure definitions.
47
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_E4#
#define NOTE_E4Value:
46
A note which can be used in tune structure definitions.
48
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_F4#
#define NOTE_F4Value:
44
A note which can be used in tune structure definitions.
49
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Gb4#
#define NOTE_Gb4Value:
41
A note which can be used in tune structure definitions.
50
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_G4#
#define NOTE_G4Value:
39
A note which can be used in tune structure definitions.
51
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Ab4#
#define NOTE_Ab4Value:
37
A note which can be used in tune structure definitions.
52
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_A4#
#define NOTE_A4Value:
35
A note which can be used in tune structure definitions.
53
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Bb4#
#define NOTE_Bb4Value:
33
A note which can be used in tune structure definitions.
54
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_B4#
#define NOTE_B4Value:
31
A note which can be used in tune structure definitions.
55
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_C5#
#define NOTE_C5Value:
29
A note which can be used in tune structure definitions.
56
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Db5#
#define NOTE_Db5Value:
27
A note which can be used in tune structure definitions.
57
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_D5#
#define NOTE_D5Value:
26
A note which can be used in tune structure definitions.
58
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Eb5#
#define NOTE_Eb5Value:
24
A note which can be used in tune structure definitions.
59
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_E5#
#define NOTE_E5Value:
23
A note which can be used in tune structure definitions.
60
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_F5#
#define NOTE_F5Value:
21
A note which can be used in tune structure definitions.
61
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Gb5#
#define NOTE_Gb5Value:
20
A note which can be used in tune structure definitions.
62
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_G5#
#define NOTE_G5Value:
19
A note which can be used in tune structure definitions.
63
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Ab5#
#define NOTE_Ab5Value:
18
A note which can be used in tune structure definitions.
64
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_A5#
#define NOTE_A5Value:
17
A note which can be used in tune structure definitions.
65
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_Bb5#
#define NOTE_Bb5Value:
16
A note which can be used in tune structure definitions.
66
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
NOTE_B5#
#define NOTE_B5Value:
15
A note which can be used in tune structure definitions.
67
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
Function Documentation#
halPlayTune_P#
void halPlayTune_P (uint8_t PGM * tune, bool bkg)
Plays a tune on the piezo buzzer.
N/A | tune | A pointer to tune to play. |
N/A | bkg | Determines whether the tune plays in the background. If true, tune plays in background; if false, tune plays in foreground. |
The tune is played in the background if ::bkg is true. Otherwise, the API blocks until the playback of the tune is complete. halPlayTune_P() is not meant to be called back-to-back.
A tune is implemented as follows:
uint8_t PGM hereIamTune[] = { //All tunes are stored in flash.
NOTE_B4, 1, //Plays the note B4 for 100 milliseconds.
0, 1, //Pause for 100 milliseconds.
NOTE_B5, 5, //Plays the note B5 for 500 milliseconds.
0, 0 //NULL terminates the tune.
};
92
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h
halStackIndicatePresence#
void halStackIndicatePresence (void )
Causes something to happen on a node (such as playing a tune on the buzzer) that can be used to indicate where it physically is.
N/A |
98
of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/plugin/buzzer/buzzer.h