pitches.h no more

This commit is contained in:
Vadim Furman
2021-03-14 20:46:58 -07:00
parent c62863b1dc
commit b20b21c553
2 changed files with 15 additions and 92 deletions

View File

@@ -7,13 +7,13 @@
#ifndef PIN_BUZZER
// Noop methods for boards w/o buzzer
void playBeep(){};
void playStartMelody(){};
void playShutdownMelody(){};
#else
#include "Tone.h"
#include "pitches.h"
extern "C" void delay(uint32_t dwMs);
@@ -22,6 +22,20 @@ struct ToneDuration {
int duration_ms;
};
// Some common frequencies.
#define NOTE_C3 131
#define NOTE_CS3 139
#define NOTE_D3 147
#define NOTE_DS3 156
#define NOTE_E3 165
#define NOTE_F3 175
#define NOTE_FS3 185
#define NOTE_G3 196
#define NOTE_GS3 208
#define NOTE_A3 220
#define NOTE_AS3 233
#define NOTE_B3 247
const int DURATION_1_8 = 125; // 1/8 note
const int DURATION_1_4 = 250; // 1/4 note