Pages: [1]   Go Down
Author Topic: need some logical help  (Read 267 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24317
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
int a = 10;
delay (3000);
doSomething ();
Logged

"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.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24317
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As usual, the answer is "look at the blink without delay example".
Logged

"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.

0
Offline Offline
God Member
*****
Karma: 1
Posts: 596
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may find this page interesting:

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

Pages: [1]   Go Up
Jump to: