Skip to content
Snippets Groups Projects
Commit d17b9a48 authored by Mario Engelmann's avatar Mario Engelmann
Browse files

more sound stuff

parent c229826e
Branches
No related tags found
No related merge requests found
File added
......@@ -170,35 +170,41 @@ void setup(void) {
pinMode(BUTTON, INPUT_PULLUP);
}
void sayInfos(float temp1up, float temp1down, float temp2up, float temp2down)
void sayInfos(float temp1up, float temp1down, float temp2up, float temp2down, uint8_t comma)
{
playFileQueue(SOUND_EINS);
playFileQueue(SOUND_OBEN);
sayNumber(temp1up, nachKommaStellen);
playFileQueue(SOUND_STILLE);
playFileQueue(SOUND_EINS);
playFileQueue(SOUND_UNTEN);
sayNumber(temp1down, nachKommaStellen);
playFileQueue(SOUND_STILLE);
playFileQueue(SOUND_ZWEI);
playFileQueue(SOUND_OBEN);
sayNumber(temp2up, nachKommaStellen);
playFileQueue(SOUND_STILLE);
playFileQueue(SOUND_ZWEI);
playFileQueue(SOUND_UNTEN);
sayNumber(temp2down, nachKommaStellen);
playFileQueue(SOUND_STILLE);
if (digitalRead(PUMP1))
{
playFileQueue(SOUND_PUMPE);
playFileQueue(SOUND_EINS);
playFileQueue(SOUND_AN);
playFileQueue(SOUND_STILLE);
}
else
{
playFileQueue(SOUND_PUMPE);
playFileQueue(SOUND_EINS);
playFileQueue(SOUND_AUS);
playFileQueue(SOUND_STILLE);
}
if (digitalRead(PUMP2))
......@@ -206,12 +212,14 @@ void sayInfos(float temp1up, float temp1down, float temp2up, float temp2down)
playFileQueue(SOUND_PUMPE);
playFileQueue(SOUND_ZWEI);
playFileQueue(SOUND_AN);
playFileQueue(SOUND_STILLE);
}
else
{
playFileQueue(SOUND_PUMPE);
playFileQueue(SOUND_ZWEI);
playFileQueue(SOUND_AUS);
playFileQueue(SOUND_STILLE);
}
}
......
......@@ -2,6 +2,7 @@
#define SOUNDFILES_H
// index for the sound files for mp3 module TDB380
// the files are .mp3 instead of .wav
#define SOUND_NULL 33 // A033.wav
#define SOUND_EIN 1 // A001.wav
#define SOUND_EINS 44 // A044.wav
......@@ -39,5 +40,6 @@
#define SOUND_UND 27 // A027.wav
#define SOUND_AN 31 // A031.wav
#define SOUND_AUS 32 // A032.wav
#define SOUND_STILLE 34 // A034.wav
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment