Go Down

Topic: need some logical help (Read 349 times) previous topic - next topic

ambuj

hi all,
        i want write a code, in this code write a condition, value will be hold for a limited time.
let us consider
a = 10;
then
a = 10 hold the value for 3 second then do some thing

can anyone know how to do it so help me out.
Thanks in advance

AWOL

Code: [Select]
int a = 10;
delay (3000);
doSomething ();
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

ambuj

thanks for your reply
but i m looking for a multitasking answer because in this code controller will be hang for that time but i dont do this i want controller must be work parallel. 

AWOL

As usual, the answer is "look at the blink without delay example".
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

mromani

You may find this page interesting:

http://arduino.cc/playground/Main/LibraryList#Timing

Go Up