Starting a project, need some advice and confirmation.

As the summer break is closing in, I will finally have some time to devote to my projects. I've been planning a Home Automation project, using an Arduino, Android app and of course some components. My choice of Arduino board has pretty much leaned towards the Arduino Mega, since it has more memory than others.

I've had several ideas of how to manage the whole sum of events, this is what I've come up with and I'd like someone to confirm if this is the right way of doing it;

1.) Assign variables from phone to server. 2.) Arduino fetches the data from the server. 3.) Arduino compares the fetched data to previous data. 4.) a.) If the fetched data is different from the previous data, Arduino will rewrite the changes to the server and complete the actions requested. b.) If there are no changes, Arduino will check that the previously requested actions are still true. 5.) "Report" back to phone.

What I need advice with, is how would I tell the arduino when to look for the data? Should I just write a sketch that checks it every "x" seconds or will that take too much of Arduinos horsepower? Is it possible to write a sketch so that the arduino responds to user input, without the arduino checking for the input all the time?

Thanks for your time and effort.

Yes, it allows both external and internal interrupts based. Maybe best way is somehow trigger a change and through that change then complete the requested actions.

Well here I am triggering a change, but the question is how I make the arduino notice the change and what is the most effective way of doing it.

Through interrupts, in your case. In my opinions is the best way, as opposed to looping it!