Need help/advice with software interupts

Hello,

i am working on project which requires to get commands from internet and change some device values. For example: on website i click the button which tell arduino to turn on the lamp. The problem is that i don't want that in arduino loop method it is looping all the time waiting/checking if do i have clicked that button or not. So is it possible to make that loop method do his own buisness, but when i press that button it call interupt function which turn on/off the light etc.?? I understand it is easy to do with hardware interupt - you physically push the button which one is connected to specified arduino external pin. But how to make similar task from the internet??

I hope you understand my idea and i will be thankful for your answers or given articles how to do such thing.

i don't want that in arduino loop method it is looping all the time waiting/checking if do i have clicked that button or not

What else did you have in mind for the processor to do?

AWOL:

i don't want that in arduino loop method it is looping all the time waiting/checking if do i have clicked that button or not

What else did you have in mind for the processor to do?

in main loop it is going to constantly (let's say every 5 min) sending gathered data from sensors to internet database.

OK, let me ask another way - why do you feel you need an interrupt (which checks for an event every 62.5ns) on a timescale that is nearly five billion times longer ;)?

AWOL: OK, let me ask another way - why do you feel you need an interrupt (which checks for an event every 62.5ns) on a timescale that is nearly five billion times longer ;)?

Good question. Maybe i don't understand well about interrupts. Let's make it clear - when we are using hardware interrupts for example, pushing the button, our push takes more time than 62.5ns so this is good for us because arduino can catch it easily and start interrupt. But when it is done by computer it is much faster and interrupt maybe can't catch it? :~

I want to do that because those commands (turn on/off, update another status info now) is going to be very rarely so i just don't think that it would be good to check those if statements every time in loop method.Maybe i am wrong and should forget about such problems?

But still does such interrupts would be possible?

Maybe i am wrong and should forget about such problems?

Yes, you are, and, yes, you should.

But still does such interrupts would be possible?

No. The internet can not trigger an external interrupt on your Arduino.