-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathSoundManagerRoutine.cpp
More file actions
32 lines (26 loc) · 864 Bytes
/
Copy pathSoundManagerRoutine.cpp
File metadata and controls
32 lines (26 loc) · 864 Bytes
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
#include <Arduino.h>
#include <AceRoutine.h>
#include "SoundRoutine.h"
using ace_routine::CoroutineScheduler;
extern SoundRoutine soundRoutine;
// The soundManager controls what the soundRoutine will play.
COROUTINE(soundManager) {
COROUTINE_LOOP() {
Serial.println("Wait 5 seconds...");
COROUTINE_DELAY(5000);
Serial.println();
Serial.println("Request Beep and wait 5 seconds...");
CoroutineScheduler::list(Serial);
soundRoutine.playSound(SOUND_BEEP);
COROUTINE_DELAY(5000);
Serial.println();
Serial.println("Request Boop and wait 5 seconds...");
CoroutineScheduler::list(Serial);
soundRoutine.playSound(SOUND_BOOP);
COROUTINE_DELAY(5000);
Serial.println();
Serial.println("Request Silence and wait 5 seconds...");
CoroutineScheduler::list(Serial);
soundRoutine.playSound(SOUND_NONE);
}
}