When alarm goes off the functions in ** alarm ** will be called. I then want to set alarmValue to true and use alarmSound to read alarmValue and make the noise/led burn/ complicated mechanism/ whatever. But i don't know hot to do this.

Are you using a real-time clock here? I can't see any evidence of it, but without one I don't see how you can hope to set or maintain an accurate time. That seems like a fairly important requirement for an alarm clock.

I only provide help via the forum - please do not contact me for private consultancy.

What is the fun in buying an alarm clock? I thought this would be a good learning project for me. I indeed did not work very accurate there, but its not that important in that piece of code. As long as we understand it, right