My code needs to wait (and do nothing else) until a digital pin goes high. But even after the pin goes high, the while loop continues to run and the code does not advance.
Serial.println("Waiting...");
while (digitalRead(SLAVE_1 == LOW)) {
if (digitalRead(SLAVE_1) == LOW) { Serial.println("Low"); }
else { Serial.println("High"); }
}
Serial.println("Slave ready.");
The output from the above loop is a never-ending stream of "High". A DVM also confirms that the pin is, in fact, high. Furthermore, I know that the pin is high even before the while loops starts. What's going on?