Flying Silicon Sensor
sounds.h File Reference

Varios methods to produce the buzzer sounds. More...

Go to the source code of this file.

Namespaces

namespace  Sounds
 

Macros

#define BUZZER_MIN_HZ   110
 
#define BUZZER_MAX_HZ   8372
 
#define BUZZER_MIN_MS   50
 
#define BUZZER_MAX_MS   10000
 
#define NOTE_C5   4186
 
#define NOTE_B4   3951
 
#define NOTE_ASH4   3729
 
#define NOTE_A4   3520
 
#define NOTE_GSH4   3322
 
#define NOTE_G4   3136
 
#define NOTE_FSH4   2960
 
#define NOTE_F4   2794
 
#define NOTE_E4   2637
 
#define NOTE_DSH4   2489
 
#define NOTE_D4   2349
 
#define NOTE_CSH4   2217
 
#define NOTE_C4   2093
 
#define NOTE_B3   1976
 
#define NOTE_ASH3   1865
 
#define NOTE_A3   1760
 
#define NOTE_GSH3   1661
 
#define NOTE_G3   1566
 
#define NOTE_FSH3   1480
 
#define NOTE_F3   1397
 
#define NOTE_E3   1319
 
#define NOTE_DSH3   1245
 
#define NOTE_D3   1175
 
#define NOTE_CSH3   1109
 
#define NOTE_C3   1047
 
#define NOTE_B2   988
 
#define NOTE_ASH2   932
 
#define NOTE_A2   880
 
#define NOTE_GSH2   831
 
#define NOTE_G2   784
 
#define NOTE_FSH2   740
 
#define NOTE_F2   698
 
#define NOTE_E2   659
 
#define NOTE_DSH2   622
 
#define NOTE_D2   587
 
#define NOTE_CSH2   554
 
#define NOTE_C2   523
 
#define NOTE_B1   494
 
#define NOTE_ASH1   466
 
#define NOTE_A1   440
 
#define NOTE_GSH1   415
 
#define NOTE_G1   392
 
#define NOTE_FSH1   370
 
#define NOTE_F1   349
 
#define NOTE_E1   330
 
#define NOTE_DSH1   311
 
#define NOTE_D1   294
 
#define NOTE_CSH1   277
 
#define NOTE_C1   262
 
#define NOTE_B   247
 
#define NOTE_ASH   233
 
#define NOTE_A   220
 
#define NOTE_GSH   208
 
#define NOTE_G   196
 
#define NOTE_FSH   185
 
#define NOTE_F   175
 
#define NOTE_E   165
 
#define NOTE_DSH   156
 
#define NOTE_D   147
 
#define NOTE_CSH   139
 
#define NOTE_C   131
 
#define NOTE_Bb4   NOTE_ASH4
 
#define NOTE_Bb3   NOTE_ASH3
 
#define NOTE_Bb2   NOTE_ASH2
 
#define NOTE_Bb1   NOTE_ASH1
 
#define NOTE_Bb   NOTE_ASH
 
#define MELODY_END   -1
 

Functions

void Sounds::setBuzzer (int pin)
 
void Sounds::playMelody (const int melody[])
 
void Sounds::playBattery (float batPct)
 
void Sounds::playDisconnect (void)
 
void Sounds::playSwitchOff (void)
 
void Sounds::playConnect (void)
 
void Sounds::playCharging (void)
 
void Sounds::beep (int freq, int ms)
 

Detailed Description

Varios methods to produce the buzzer sounds.

Arduino code for Flying Silicon Airspeed/Vario Probe and TotalVario Android app.

For more information refer to: https://flyingsilicon.blogspot.com/
https://totalvario.blogspot.com/

ThSH program SH free software: you can redSHtribute it and/or modify it under the terms of the GNU General Public License as publSHhed by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ThSH program SH dSHtributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License http://www.gnu.org/licenses/ for more details.

Definition in file sounds.h.

Macro Definition Documentation

◆ BUZZER_MAX_HZ

#define BUZZER_MAX_HZ   8372

Definition at line 31 of file sounds.h.

◆ BUZZER_MAX_MS

#define BUZZER_MAX_MS   10000

Definition at line 35 of file sounds.h.

◆ BUZZER_MIN_HZ

#define BUZZER_MIN_HZ   110

Definition at line 29 of file sounds.h.

◆ BUZZER_MIN_MS

#define BUZZER_MIN_MS   50

Definition at line 33 of file sounds.h.

◆ MELODY_END

#define MELODY_END   -1

Definition at line 114 of file sounds.h.

◆ NOTE_A

#define NOTE_A   220

Definition at line 95 of file sounds.h.

◆ NOTE_A1

#define NOTE_A1   440

Definition at line 82 of file sounds.h.

◆ NOTE_A2

#define NOTE_A2   880

Definition at line 69 of file sounds.h.

◆ NOTE_A3

#define NOTE_A3   1760

Definition at line 56 of file sounds.h.

◆ NOTE_A4

#define NOTE_A4   3520

Definition at line 43 of file sounds.h.

◆ NOTE_ASH

#define NOTE_ASH   233

Definition at line 94 of file sounds.h.

◆ NOTE_ASH1

#define NOTE_ASH1   466

Definition at line 81 of file sounds.h.

◆ NOTE_ASH2

#define NOTE_ASH2   932

Definition at line 68 of file sounds.h.

◆ NOTE_ASH3

#define NOTE_ASH3   1865

Definition at line 55 of file sounds.h.

◆ NOTE_ASH4

#define NOTE_ASH4   3729

Definition at line 42 of file sounds.h.

◆ NOTE_B

#define NOTE_B   247

Definition at line 93 of file sounds.h.

◆ NOTE_B1

#define NOTE_B1   494

Definition at line 80 of file sounds.h.

◆ NOTE_B2

#define NOTE_B2   988

Definition at line 67 of file sounds.h.

◆ NOTE_B3

#define NOTE_B3   1976

Definition at line 54 of file sounds.h.

◆ NOTE_B4

#define NOTE_B4   3951

Definition at line 41 of file sounds.h.

◆ NOTE_Bb

#define NOTE_Bb   NOTE_ASH

Definition at line 110 of file sounds.h.

◆ NOTE_Bb1

#define NOTE_Bb1   NOTE_ASH1

Definition at line 109 of file sounds.h.

◆ NOTE_Bb2

#define NOTE_Bb2   NOTE_ASH2

Definition at line 108 of file sounds.h.

◆ NOTE_Bb3

#define NOTE_Bb3   NOTE_ASH3

Definition at line 107 of file sounds.h.

◆ NOTE_Bb4

#define NOTE_Bb4   NOTE_ASH4

Definition at line 106 of file sounds.h.

◆ NOTE_C

#define NOTE_C   131

Definition at line 104 of file sounds.h.

◆ NOTE_C1

#define NOTE_C1   262

Definition at line 91 of file sounds.h.

◆ NOTE_C2

#define NOTE_C2   523

Definition at line 78 of file sounds.h.

◆ NOTE_C3

#define NOTE_C3   1047

Definition at line 65 of file sounds.h.

◆ NOTE_C4

#define NOTE_C4   2093

Definition at line 52 of file sounds.h.

◆ NOTE_C5

#define NOTE_C5   4186

Definition at line 39 of file sounds.h.

◆ NOTE_CSH

#define NOTE_CSH   139

Definition at line 103 of file sounds.h.

◆ NOTE_CSH1

#define NOTE_CSH1   277

Definition at line 90 of file sounds.h.

◆ NOTE_CSH2

#define NOTE_CSH2   554

Definition at line 77 of file sounds.h.

◆ NOTE_CSH3

#define NOTE_CSH3   1109

Definition at line 64 of file sounds.h.

◆ NOTE_CSH4

#define NOTE_CSH4   2217

Definition at line 51 of file sounds.h.

◆ NOTE_D

#define NOTE_D   147

Definition at line 102 of file sounds.h.

◆ NOTE_D1

#define NOTE_D1   294

Definition at line 89 of file sounds.h.

◆ NOTE_D2

#define NOTE_D2   587

Definition at line 76 of file sounds.h.

◆ NOTE_D3

#define NOTE_D3   1175

Definition at line 63 of file sounds.h.

◆ NOTE_D4

#define NOTE_D4   2349

Definition at line 50 of file sounds.h.

◆ NOTE_DSH

#define NOTE_DSH   156

Definition at line 101 of file sounds.h.

◆ NOTE_DSH1

#define NOTE_DSH1   311

Definition at line 88 of file sounds.h.

◆ NOTE_DSH2

#define NOTE_DSH2   622

Definition at line 75 of file sounds.h.

◆ NOTE_DSH3

#define NOTE_DSH3   1245

Definition at line 62 of file sounds.h.

◆ NOTE_DSH4

#define NOTE_DSH4   2489

Definition at line 49 of file sounds.h.

◆ NOTE_E

#define NOTE_E   165

Definition at line 100 of file sounds.h.

◆ NOTE_E1

#define NOTE_E1   330

Definition at line 87 of file sounds.h.

◆ NOTE_E2

#define NOTE_E2   659

Definition at line 74 of file sounds.h.

◆ NOTE_E3

#define NOTE_E3   1319

Definition at line 61 of file sounds.h.

◆ NOTE_E4

#define NOTE_E4   2637

Definition at line 48 of file sounds.h.

◆ NOTE_F

#define NOTE_F   175

Definition at line 99 of file sounds.h.

◆ NOTE_F1

#define NOTE_F1   349

Definition at line 86 of file sounds.h.

◆ NOTE_F2

#define NOTE_F2   698

Definition at line 73 of file sounds.h.

◆ NOTE_F3

#define NOTE_F3   1397

Definition at line 60 of file sounds.h.

◆ NOTE_F4

#define NOTE_F4   2794

Definition at line 47 of file sounds.h.

◆ NOTE_FSH

#define NOTE_FSH   185

Definition at line 98 of file sounds.h.

◆ NOTE_FSH1

#define NOTE_FSH1   370

Definition at line 85 of file sounds.h.

◆ NOTE_FSH2

#define NOTE_FSH2   740

Definition at line 72 of file sounds.h.

◆ NOTE_FSH3

#define NOTE_FSH3   1480

Definition at line 59 of file sounds.h.

◆ NOTE_FSH4

#define NOTE_FSH4   2960

Definition at line 46 of file sounds.h.

◆ NOTE_G

#define NOTE_G   196

Definition at line 97 of file sounds.h.

◆ NOTE_G1

#define NOTE_G1   392

Definition at line 84 of file sounds.h.

◆ NOTE_G2

#define NOTE_G2   784

Definition at line 71 of file sounds.h.

◆ NOTE_G3

#define NOTE_G3   1566

Definition at line 58 of file sounds.h.

◆ NOTE_G4

#define NOTE_G4   3136

Definition at line 45 of file sounds.h.

◆ NOTE_GSH

#define NOTE_GSH   208

Definition at line 96 of file sounds.h.

◆ NOTE_GSH1

#define NOTE_GSH1   415

Definition at line 83 of file sounds.h.

◆ NOTE_GSH2

#define NOTE_GSH2   831

Definition at line 70 of file sounds.h.

◆ NOTE_GSH3

#define NOTE_GSH3   1661

Definition at line 57 of file sounds.h.

◆ NOTE_GSH4

#define NOTE_GSH4   3322

Definition at line 44 of file sounds.h.