oK. So, my project is due pretty soon and I'm already deep into using processing and that's why i rather not use C# now. If you guys are telling me, there's no way i can use arduino to get user input, that's fine

I don't think anyone has said that. If you want to get user input without an external computer, you can use an LCD or other display device. If you are ok using an application running on your PC then you can use Processing or C#. Arduino doesn't care as long as send it a value that it can recognize as an alarm time.

It seems that you have two parts to your project:- Processing or C# gets an alarm time from a user and sends this to arduino via the serial port- Arduino receives an alarm time from a PC and responds accordingly

not sure which of these you are having trouble with, but there are many ways you can implent both of the tasks.

Quote: Processing or C# gets an alarm time from a user and sends this to arduino via the serial port

Yes, that's my question- how can the user send the input time from processing over to the arduino?This is the part of my code that gets user input from processing. h and m are the user input variables But how do you send these values to the arduino?

You can convert the hour and minute into elapsed seconds using the logic posted in Reply#6 and send this to Arduino using similar code to the example Processing sketch that sets the time (pick a different header byte so you can differentiate the message to set the alarm from the one to set the time.

Then use the Arduino code that you have working from post#6 to trigger the alarm.

mem: Can you tell me with syntax how I can send two numbers (h and m) using headers over the serial port?Also, where in the arduino code below is the time header retrieved from processing? I'm asking so i know how to modify the code. sorry i'm having you baby-sit me thru the process

You can see how to send Data to Arduino by studying the Processing Serial examples. There is Arduino code at the end of the Processing example sketches. In Processing, select : Files/Examples/Libraries/Serial/

I have added some more comments to help clarify how the Arduino sketch gets the time.

void getPCtime() { // if time available from serial port, sync the DateTime library // a time message consists of a header followed by ten digits (TIME_MSG_LEN equals 11) while(Serial.available() >= TIME_MSG_LEN ){ // time message // you make sure you have the start of the message by checking the header if( Serial.read() == TIME_HEADER ) { // header was found so get the next ten digits and convert to a number time_t pctime = 0; for(int i=0; i < TIME_MSG_LEN -1; i++){ char c= Serial.read(); if( c >= '0' && c <= '9') pctime = (10 * pctime) + (c - '0') ; // convert digits to a number // the ASCII character is converted to a digit by subtracting '0' which has an ASCII value 48.// So, if ch equals '1', its ASCII value is 49. 49- '0' is the same as 49-48 and they both equal 1,// which is the numeric value of the character '1' } // the next method sets the clock with the pc time received above DateTime.sync(pctime); // Sync DateTime clock to the time received on the serial port } }}

I think my case is different. So, parsing the data the same way you do as the time clock shouldn't be the same way. I guess the question now is how do you parse the data since i'm sending two integers over the port. The processing code below is wat i'm using to send the data to the arduino, how would you parse it in arduino? Thanks!