Hello,
I'm working on a project using Arduino Ethernet shield and a radio transmitter module to control some wireless outlets via a web interface. Most of the job is done, but i have a problem. Besidess the ON/OFF commands that instantly open or close the outlet, i have also some options that allow you to close/open the outlet after an amout of time. I am currently using delay() for that, so if i have a command that wants the outlet to open in 60 seconds, i use a 60 seconds delay. The problem with this is that i can't do anything else on the web interface while this delay is in action ( for example giving a command to another outlet ). I've found the elapsedMillis library that is supposed to counter that but i can't seem to work my way around it.
Here is an example of one of the if's i use. I don't know exactly how to implement the elapsedMillis functions. If anyone could help i'd really appriciate it.
if (inString.indexOf("?T2_ON=10sec")>0){
delay(10000);
mySwitch.send(1394005, 24);
}
Have a great day and thanks for the help,
Tudor.