For the life of me I can't get this to go together, any help would be appreciated. One very important note, the below case statement can not block the user from pressing other keys on the keyboard and and being able to manipulate their functions (e.g. press R increases temperature by 1)
User presses 'z', this triggers the "silence" mode of my alarm. The looping sound I have in my program stops (that works). Then what I need from this case statement is to:
1: start a timer, so that if the user does not press 'z' again within 5 seconds it will automatically break out of the 'silence' condition and start the looping sound again
2: the user can manually pause the silence condition, by pressing 'z' before the 5 seconds is up.
Here's what I have, and the functions below that are called
if(isSilenceValid() == TRUE)
if((currentTime - timeOfMute) >= 1)
here are the two functions called above