if (digitalRead(reset) == LOW), digitalWrite(pin52) == HIGH);
I am just trying to switch a relay that will shut down a OLED when a sensor senses an obstacle. the sensor switches reset low and i want to send a signal high to the signal pin of the relay.
if (digitalRead(reset) == LOW)
, digitalWrite(pin52) == HIGH);
the comma is outside the if condition making it part of the body of the if
but a "," used in that way is not valid
and presumably you didn't intend to make a comparison to HIGH and did intent the "HIGH" to be the 2nd argument to the digitalWrite (), setting pin52 to HIGH
Not in the code you quoted. That would fail to compile because digitalWrite is not provided two arguments.
With two arguments, the statement becomes syntactically correct and does nothing but the digitalWrite, onaconna that misplaced and certainly not what s/he wanted semicolon.
HEY!! that did it. it uploaded only one issue. i have looked at that link so many times and it never clicked. Damn dont program on COVID i guess. One issue is that it doesnt do what im asking. ill dig in more and see if i can figure this out.