system
1
I am curious, I have a controller that needs to look at the status of three inputs to give me a go or no go.
I was planning to nest if statements, then I was looking at the if statements using the && operator.
Can I do something like:
if(door1 == HIGH && door2 == HIGH && door3 ==HIGH)
{
go do this
}
Yes. Or this...
if ( door1 && door2 && door3 )
system
3
Now that is interesting, will it be true if all three match in ANY condition or only if HIGH?
system
4
Any condition:
if ( (c1==c2) && (c2==c3) ) {
}
system
5
Thanks!
That saves some work.