What's wrong with the even simpler version?
if (sensorValue >500) digitalWrite(Relay, HIGH);
else digitalWrite(Relay, LOW);
Steve
What's wrong with the even simpler version?
if (sensorValue >500) digitalWrite(Relay, HIGH);
else digitalWrite(Relay, LOW);
Steve