I am trying to get two limits to or on the same while statement. Can this be done?
while (digitalRead (home_limit)) {
This works for one(1) limit, But when I try using two(2) limits is does not work. I can't find the proper configuration. I tried this.
while (digitalRead (home_limit1) || (home_limit2)) {
I also tried other combinations with no luck. Does anyone know how to do an or (||) statement with a while digital read?
while(digitalRead(home_limit1) || home_limit2)
, the program will not evaluatehome_limit2
as long asdigitalRead(home_limit1)
return 1, is that what you want? do you really meanswhile(digitalRead(home_limit1) && home_limit2)
? If this is not what you want, you will need to edit your post to explain in plain English of what you want first.