Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
tones.h
Go to the documentation of this file.
1
12#ifndef WOMBAT_TONES_H
13#define WOMBAT_TONES_H
14
15#include <Arduino.h>
16
17#define PIEZO_BUZZER_PIN GPIO_NUM_17
18
23static void init_tones(){
24 pinMode(PIEZO_BUZZER_PIN, OUTPUT);
25}
26
30static void startup_tone(){
31 tone(PIEZO_BUZZER_PIN, 494); // B4
32 delay(100);
33 tone(PIEZO_BUZZER_PIN, 740); // F5#
34 delay(100);
35 tone(PIEZO_BUZZER_PIN, 784); // G5
36 delay(100);
37 tone(PIEZO_BUZZER_PIN, 1175); // D6
38 delay(400);
39 noTone(PIEZO_BUZZER_PIN);
40}
41
45static void shutdown_tone(){
46 tone(PIEZO_BUZZER_PIN, 1175); // D6
47 delay(100);
48 tone(PIEZO_BUZZER_PIN, 784); // G5
49 delay(100);
50 tone(PIEZO_BUZZER_PIN, 740); // F5#
51 delay(100);
52 tone(PIEZO_BUZZER_PIN, 494); // B4
53 delay(400);
54 noTone(PIEZO_BUZZER_PIN);
55}
56
60static void completed_tone(){
61 tone(PIEZO_BUZZER_PIN, 1319); // E6
62 delay(100);
63 noTone(PIEZO_BUZZER_PIN);
64}
65
69static void message_tone(){
70 tone(PIEZO_BUZZER_PIN, 1319); // E6
71 delay(100);
72 tone(PIEZO_BUZZER_PIN, 1760); // A6
73 delay(100);
74 noTone(PIEZO_BUZZER_PIN);
75}
76
80static void error_tone(){
81 tone(PIEZO_BUZZER_PIN, 294); // D4
82 delay(100);
83 tone(PIEZO_BUZZER_PIN, 131); // C3
84 delay(100);
85 noTone(PIEZO_BUZZER_PIN);
86}
87
88#endif //WOMBAT_TONES_H
static void shutdown_tone()
Used on device shutdown.
Definition: tones.h:45
#define PIEZO_BUZZER_PIN
GPIO pin to control the piezo buzzer.
Definition: tones.h:17
static void message_tone()
BluetoothLE message received tone.
Definition: tones.h:69
static void startup_tone()
Used on device startup.
Definition: tones.h:30
static void init_tones()
Start tones by setting GPIO pin as an OUTPUT to control the onboard piezo buzzer.
Definition: tones.h:23
static void completed_tone()
Command completed tone.
Definition: tones.h:60
static void error_tone()
Generic error tone.
Definition: tones.h:80