What I am going for here is if the button is low (pressed in) and the potentiometer is at less then 50% then it will blink the led. I actually just saw the brightness stuff below that and I'm not sure why I have it. It doesn't need to be there.
sterretje:
Inif (analogRead(switchpin) == LOW && analogRead(sensorpin) <= || == 499) {what is analogRead(sensorpin) <= || == 499 supposed to mean / do? You have plenty of that type of constructions.