Help with IF condition?


how make arduino check particular pins( namely 5 pins) whether high or low 10 seconds, because interrupts check changes time? suppose not able use interrupts , need check particular pins 10 seconds should go off?

code: [select]

void loop()
{
int = digitalread(2);
int b = digitalread(3);
int c = digitalread(4);
int d = digitalread(5);
int e = digitalread(6);

if(a ==1)
{
//do something
}

if(b == 1)
{
// something
}
....


 


this process should checked processor 10 seconds , after should not check.. how do it?

you need specify action more precisely mean.

check 5 buttons remain active simultaneously entire 10 second time frame
check 5 buttons become active simultaneously @ point within given 10 second time frame
check each of 5 buttons become active @ least once within 10 second time frame

also 10 second time frame @ start or 10 second time frame while sketch running?


Arduino Forum > Using Arduino > Project Guidance > Help with IF condition?


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code