My name is Jim and I am new to the arduino environment as well as the forums. I've been using arduino UNO for the last two weeks (and not very often to be honest) for academic purposes since I need it for the Emerging technologies and Themes class in my university. 2 weeks ago my instructor gave us an assignment to work in groups. Unfortunatelly I am the only one from my group who cares about his grade so I am the only one worrying about doing it. He asked for an alarm clock (only the code on IDE not a real clock) with the following functions:
a) The user should be asked to put current time (hh:mm:ss) in order to set the clock running. b) The user should be asked to put alarm time (hh:mm:ss) in order to set alarm on. c) The user should be able to either stopping the alarm by pressing "P" or snooze it for 5 minutes by pressing "N"
The alarm should be displayed using a blinking LED.
After wondering around in the arduino playground I found the Time library that REALLY made my life a lot easier in setting the clock. But the problem is that I cannot make it the way my instructor wants. I use the " if Serial.available())" function in order to prohibit the clock start running on its own, and I use the Serial.read() function to give the time manually. The problem is that the code completely ignores the Serial.available function and it doesn't wait for me to send something as it should. Instead, the clock starts running from time 00:00:00. I can set the current time and the alarm time manually through the code directly, but this is not what I need. My main part of code is the example in the TimeAlarm library of arduino and I modify this code in order to match it for my needs. I also have the same problem with the snooze and stop functions since the IDE console ignores ANYTHING I try to send.
Please it is really essential if you can give me an idea on how to make the time to be set by the user and I would appreciate it if you could give me an idea on how to work with the snooze and stop functions.
Due respect, Jim