How to keep an output (in my case relay) HIGH when two inputs (one IR sensor AND one switch) are HIGH?? The output should remain HIGH as long as both inputs are HIGH. Using a delay is not possible in this case because the arduino is doing other stuff aswell.
This is the part of my sketch but the relay is only very briefly activated..
if (sensorState0 == HIGH && valA4 == HIGH) {
digitalWrite(relay0, HIGH);
What does line 7 say in the book on my lap? You can answer that about as easy as we can answer your question. Post your code using code tags, If you read the link camsysca has posted you will understand what to do.