Wave Shield Alarm Clock - Need advice

Greetings.

I am in the (slow) process of making myself an alarm clock. This is my first real arduino project and so far i think its going pretty good.

The idea is that the alarm plays a random sound file at a set time, so as not to get used to the sound and sleep through it.

For this i am using an Arduino Uno, Wave Shield, DS1307 RTC and a 2*16 LCD Keypad.

It all works smoothly, the display shows correct time and date, the buttons all work and the alarm functions when i use a sketch i found somewhere(attached in zip).
The Wave Shield also functions fine, when run with the daphc sketch from lady adas Wave Shield guide.

But i am at a loss on how to combine the two…

I tried to simply add the daphc sketch to the clock sketch, to see if i could find a way to call it when the alarm would go of, but ended up running out of memory before i found out if that idea could work.

Any help, tips, tricks, examples or advice would be very appreciated.

Im too far into this to turn around now.

Thanks in advance
Mads

alarm.ino (4.77 KB)

analog_buttons.ino (1.84 KB)

dateTime.ino (2.49 KB)

LCD_digital_clock_ds1307_alarm.ino (13 KB)

I tried to simply add the daphc sketch

Which apparently has some other actual name...

to the clock sketch

Which apparently has some other actual name...

Any help, tips, tricks, examples or advice would be very appreciated.

Refer to the actual names. Don't expect us to guess.

Sorry, i uploaded the wrong sketch…

This is the sketch i combined from the LCD_digital_clock_ds1307_alarm sketch i uploaded before, and this sketch (the uploaded file called WaveTest)

It runs out of memory. This is where i am stuck.

Im unsure if im on the right track at all to get it to work, so any pointers are welcome.

alarm.ino (4.77 KB)

analog_buttons.ino (1.84 KB)

Clock.ino (15.6 KB)

dateTime.ino (2.49 KB)

WaveTest.ino (3.97 KB)