In
if (analogRead(switchpin) == LOW && analogRead(sensorpin) <= || == 499) {
what is analogRead(sensorpin) <= || == 499 supposed to mean / do? You have plenty of that type of constructions.
In
if (analogRead(switchpin) == LOW && analogRead(sensorpin) <= || == 499) {
what is analogRead(sensorpin) <= || == 499 supposed to mean / do? You have plenty of that type of constructions.